Class AnimationManager
Handles the animation timeline and playback of animations. The animation system is still a work in progress.
public class AnimationManager : MonoBehaviour
- Inheritance
-
AnimationManager
Fields
framerate
public int framerate
Field Value
onionSkinColour
public Color onionSkinColour
Field Value
- Color
showOnionSkin
public bool showOnionSkin
Field Value
Properties
currentFrameIndex
The number of the frame currently being displayed.
public int currentFrameIndex { get; set; }
Property Value
Methods
AddKeyFrame()
Extends the length of the animation by adding one frame to the end.
public void AddKeyFrame()
DebugLogKeyFrames()
For debugging purposes. Prints the current frame number and the frame numbers of each keyframe.
public void DebugLogKeyFrames()
DeleteSelectedKeyFrame()
Deletes the selected key frame.
public void DeleteSelectedKeyFrame()
Pause()
Pauses the animation playback.
public void Pause()
Play()
Starts/resumes the animation playback.
public void Play()
RemoveKeyFrame()
Reduces the length of the animation by removing the final frame.
public void RemoveKeyFrame()
Stop()
Stops the animation playback and resets the current frame number back to the start.
public void Stop()
SubscribeToOnCurrentFrameIndexChange(UnityAction)
Event is invoked when the current frame number changes.
public void SubscribeToOnCurrentFrameIndexChange(UnityAction call)
Parameters
call
UnityAction
SubscribeToOnKeyFrameAdded(UnityAction)
Event is invoked when a keyframe is added.
public void SubscribeToOnKeyFrameAdded(UnityAction call)
Parameters
call
UnityAction
SubscribeToOnKeyFrameDeleted(UnityAction)
Event is invoked when a keyframe is deleted.
public void SubscribeToOnKeyFrameDeleted(UnityAction call)
Parameters
call
UnityAction