Interface ICharacterVisual

Namespace
SurvivorsMaker.Presentation
Assembly
SurvivorsMaker.Presentation.dll

Animation hooks for a character or enemy body. The default is a sprite with simple tweens; adapters for character kits (e.g. layered sprite rigs) implement this on their own prefab.

public interface ICharacterVisual

Methods

PlayAttack()

void PlayAttack()

PlayDeath(Action)

Calls done when the death animation finished (or at once).

void PlayDeath(Action done)

Parameters

done Action

PlayHurt()

void PlayHurt()

ResetVisual()

Back to the spawn state when taken from a pool.

void ResetVisual()

SetFacing(float)

Negative = facing left, positive = right.

void SetFacing(float x)

Parameters

x float

SetMotion(Vector2)

Velocity in world units per second; zero = idle.

void SetMotion(Vector2 velocity)

Parameters

velocity Vector2