Table of Contents

Class AnimationData

Namespace
SampSharp.OpenMp.Core.Api
Assembly
SampSharp.OpenMp.Core.dll

Provides animation data for the ApplyAnimation function.

[NativeMarshalling(typeof(AnimationDataMarshaller))]
public record AnimationData : IEquatable<AnimationData>
Inheritance
AnimationData
Implements
Inherited Members

Constructors

AnimationData(AnimationData)

protected AnimationData(AnimationData original)

Parameters

original AnimationData

AnimationData(float, bool, bool, bool, bool, uint, string, string)

Provides animation data for the ApplyAnimation function.

public AnimationData(float Delta, bool Loop, bool LockX, bool LockY, bool Freeze, uint Time, string Library, string Name)

Parameters

Delta float

The speed to play the animation.

Loop bool

If set to 1, the animation will loop. If set to 0, the animation will play once.

LockX bool

If set to 0, the player is returned to their old X coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position.

LockY bool

Same as above but for the Y axis. Should be kept the same as the previous parameter.

Freeze bool

Setting this to 1 will freeze the player at the end of the animation. 0 will not.

Time uint

Timer in milliseconds. For a never-ending loop it should be 0.

Library string

The animation library of the animation to apply.

Name string

The name of the animation to apply.

Properties

Delta

The speed to play the animation.

public float Delta { get; init; }

Property Value

float

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Freeze

Setting this to 1 will freeze the player at the end of the animation. 0 will not.

public bool Freeze { get; init; }

Property Value

bool

Library

The animation library of the animation to apply.

public string Library { get; init; }

Property Value

string

LockX

If set to 0, the player is returned to their old X coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position.

public bool LockX { get; init; }

Property Value

bool

LockY

Same as above but for the Y axis. Should be kept the same as the previous parameter.

public bool LockY { get; init; }

Property Value

bool

Loop

If set to 1, the animation will loop. If set to 0, the animation will play once.

public bool Loop { get; init; }

Property Value

bool

Name

The name of the animation to apply.

public string Name { get; init; }

Property Value

string

Time

Timer in milliseconds. For a never-ending loop it should be 0.

public uint Time { get; init; }

Property Value

uint

Methods

Deconstruct(out float, out bool, out bool, out bool, out bool, out uint, out string, out string)

public void Deconstruct(out float Delta, out bool Loop, out bool LockX, out bool LockY, out bool Freeze, out uint Time, out string Library, out string Name)

Parameters

Delta float
Loop bool
LockX bool
LockY bool
Freeze bool
Time uint
Library string
Name string

Equals(AnimationData?)

public virtual bool Equals(AnimationData? other)

Parameters

other AnimationData

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(AnimationData?, AnimationData?)

public static bool operator ==(AnimationData? left, AnimationData? right)

Parameters

left AnimationData
right AnimationData

Returns

bool

operator !=(AnimationData?, AnimationData?)

public static bool operator !=(AnimationData? left, AnimationData? right)

Parameters

left AnimationData
right AnimationData

Returns

bool