platformer
Public Member Functions | Public Attributes | List of all members
UnityPlatformer.CharacterAnimator Class Referenceabstract

Animator class More...

Inheritance diagram for UnityPlatformer.CharacterAnimator:
UnityPlatformer.IUpdateEntity UnityPlatformer.CharacterAnimatorUnity

Public Member Functions

virtual void Start ()
 Start listening More...
 
virtual void OnEnable ()
 sync UpdateManager More...
 
virtual void OnDisable ()
 sync UpdateManager More...
 
virtual void PlatformerUpdate (float delta)
 Calculate what animation to play and do it! More...
 
virtual void LatePlatformerUpdate (float delta)
 do nothing More...
 
abstract void Play (string animation)
 Play animation More...
 
abstract void PlaybackSpeed (float speed)
 Set playback speed. More...
 
abstract void StopPlayback ()
 Stop current animation More...
 
abstract void StartPlayback ()
 Continue playing current animation More...
 
abstract float GetAnimationLength (string animation)
 Get animation length in seconds More...
 
virtual void OnAreaChange (Areas before, Areas after)
 Not used atm More...
 
virtual void OnInjuredCharacter (Damage dt, CharacterHealth h, Character to)
 Not used atm More...
 
virtual void OnStateChange (States before, States after)
 Not used atm More...
 

Public Attributes

Character character
 Character More...
 
bool rotateOnSlopes = true
 When a player is on a slope rotate the player the same angle? More...
 
float maxSlope = 70f
 Max rotation slope, above this value it will be 0º More...
 
string fallLoop = "falling"
 
string fenceIdle = "fence_idle"
 
string fenceRight = "fence_right"
 
string fenceLeft = "fence_left"
 
string fenceUp = "fence_up"
 
string fenceDown = "fence_down"
 
string ladder = "ladder"
 
string rope = "rope"
 
string pushing = "pushing"
 
string pulling = "pulling"
 
string swimming = "swimming"
 
string wallsliding = "wallsliding"
 
string slipping = "slipping"
 
string grabbing = "grabbing"
 
string attackMelee = "attack_melee"
 
string jump = "jump"
 
string walk = "walk"
 
string idle = "idle"
 
string crounchWalk = "crounch_walk"
 
string crounchIdle = "crounch_idle"
 
float previousSpeed
 Previous speed changed when calling PlaybackSpeed, StopPlayback or StartPlayback More...
 

Detailed Description

Animator class

Use all data available at Character & cia to know what to play

Member Function Documentation

◆ GetAnimationLength()

abstract float UnityPlatformer.CharacterAnimator.GetAnimationLength ( string  animation)
pure virtual

Get animation length in seconds

Implemented in UnityPlatformer.CharacterAnimatorUnity.

◆ LatePlatformerUpdate()

virtual void UnityPlatformer.CharacterAnimator.LatePlatformerUpdate ( float  delta)
inlinevirtual

do nothing

Implements UnityPlatformer.IUpdateEntity.

◆ OnAreaChange()

virtual void UnityPlatformer.CharacterAnimator.OnAreaChange ( Areas  before,
Areas  after 
)
inlinevirtual

Not used atm

◆ OnDisable()

virtual void UnityPlatformer.CharacterAnimator.OnDisable ( )
inlinevirtual

◆ OnEnable()

virtual void UnityPlatformer.CharacterAnimator.OnEnable ( )
inlinevirtual

◆ OnInjuredCharacter()

virtual void UnityPlatformer.CharacterAnimator.OnInjuredCharacter ( Damage  dt,
CharacterHealth  h,
Character  to 
)
inlinevirtual

Not used atm

◆ OnStateChange()

virtual void UnityPlatformer.CharacterAnimator.OnStateChange ( States  before,
States  after 
)
inlinevirtual

Not used atm

◆ PlatformerUpdate()

virtual void UnityPlatformer.CharacterAnimator.PlatformerUpdate ( float  delta)
inlinevirtual

Calculate what animation to play and do it!

Implements UnityPlatformer.IUpdateEntity.

◆ Play()

abstract void UnityPlatformer.CharacterAnimator.Play ( string  animation)
pure virtual

Play animation

NOTE this method should check that it's not currently playing the given animation, because each PlatformerUpdate you will recieve the same animation

Implemented in UnityPlatformer.CharacterAnimatorUnity.

◆ PlaybackSpeed()

abstract void UnityPlatformer.CharacterAnimator.PlaybackSpeed ( float  speed)
pure virtual

Set playback speed.

1: normal
0-1: slow-motion
>1: fast-motion

Implemented in UnityPlatformer.CharacterAnimatorUnity.

◆ Start()

virtual void UnityPlatformer.CharacterAnimator.Start ( )
inlinevirtual

Start listening

Reimplemented in UnityPlatformer.CharacterAnimatorUnity.

◆ StartPlayback()

abstract void UnityPlatformer.CharacterAnimator.StartPlayback ( )
pure virtual

Continue playing current animation

Implemented in UnityPlatformer.CharacterAnimatorUnity.

◆ StopPlayback()

abstract void UnityPlatformer.CharacterAnimator.StopPlayback ( )
pure virtual

Stop current animation

Implemented in UnityPlatformer.CharacterAnimatorUnity.

Member Data Documentation

◆ character

Character UnityPlatformer.CharacterAnimator.character

◆ maxSlope

float UnityPlatformer.CharacterAnimator.maxSlope = 70f

Max rotation slope, above this value it will be 0º

◆ previousSpeed

float UnityPlatformer.CharacterAnimator.previousSpeed

Previous speed changed when calling PlaybackSpeed, StopPlayback or StartPlayback

◆ rotateOnSlopes

bool UnityPlatformer.CharacterAnimator.rotateOnSlopes = true

When a player is on a slope rotate the player the same angle?


The documentation for this class was generated from the following file: