platformer
Public Member Functions | Public Attributes | List of all members
UnityPlatformer.CharacterAnimatorUnity Class Reference

Animator class using UnityEngine.Animator More...

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

Public Member Functions

override void Start ()
 call animator.Play More...
 
override void Play (string animation)
 Play animation More...
 
override void PlaybackSpeed (float speed)
 Set playback speed. More...
 
override void StopPlayback ()
 Stop current animation More...
 
override void StartPlayback ()
 Continue playing current animation More...
 
override float GetAnimationLength (string animation)
 Get animation length in seconds using RuntimeAnimatorController More...
 
- Public Member Functions inherited from UnityPlatformer.CharacterAnimator
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...
 
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

Animator animator
 Unity docs: Interface to control the Mecanim animation system. More...
 
- Public Attributes inherited from UnityPlatformer.CharacterAnimator
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 using UnityEngine.Animator

Member Function Documentation

◆ GetAnimationLength()

override float UnityPlatformer.CharacterAnimatorUnity.GetAnimationLength ( string  animation)
inlinevirtual

Get animation length in seconds using RuntimeAnimatorController

Implements UnityPlatformer.CharacterAnimator.

◆ Play()

override void UnityPlatformer.CharacterAnimatorUnity.Play ( string  animation)
inlinevirtual

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

Implements UnityPlatformer.CharacterAnimator.

◆ PlaybackSpeed()

override void UnityPlatformer.CharacterAnimatorUnity.PlaybackSpeed ( float  speed)
inlinevirtual

Set playback speed.

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

Implements UnityPlatformer.CharacterAnimator.

◆ Start()

override void UnityPlatformer.CharacterAnimatorUnity.Start ( )
inlinevirtual

call animator.Play

Reimplemented from UnityPlatformer.CharacterAnimator.

◆ StartPlayback()

override void UnityPlatformer.CharacterAnimatorUnity.StartPlayback ( )
inlinevirtual

Continue playing current animation

Implements UnityPlatformer.CharacterAnimator.

◆ StopPlayback()

override void UnityPlatformer.CharacterAnimatorUnity.StopPlayback ( )
inlinevirtual

Stop current animation

Implements UnityPlatformer.CharacterAnimator.

Member Data Documentation

◆ animator

Animator UnityPlatformer.CharacterAnimatorUnity.animator

Unity docs: Interface to control the Mecanim animation system.


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