UnityEssentials
Small but useful tools and features for Unity
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
UnityEngine.SimpleAnimationsManager Class Reference

Component used to control the behaviour of any SimpleAnimation More...

Collaboration diagram for UnityEngine.SimpleAnimationsManager:
Collaboration graph

Public Member Functions

SimpleAnimation GetAnimation (int index)
 Obtain an animation configured trough the inspector and stored in the SimpleAnimationsManager's memory. More...
 
SimpleAnimation GetAnimation (string animationName)
 Returns the simple animation stored in this SimpleAnimationsManager witht he same name as the given. More...
 
void Play (SimpleAnimation animation, bool resume=false)
 Starts playing the animation. More...
 
void Play (string animationName, bool resume=false)
 Starts playing the animation. More...
 
void Play (int index, bool resume=false)
 Starts playing the animation. More...
 
void Stop (SimpleAnimation animation)
 Stops playing the animation. More...
 
void Play (string animationName)
 Starts playing the animation. More...
 
void Stop (int index)
 Stops playing the animation. More...
 
void Stop (string animationName)
 Stops playing the animation. More...
 
void SetProgress (SimpleAnimation animation, float progress)
 Sets the animation at the given progress. More...
 
void SetProgress (string animationName, float progress)
 Sets the animation at the given progress. More...
 
void SetProgress (int index, float progress)
 Sets the animation at the given progress. More...
 

Public Attributes

List< ISimpleAnimationanimations
 List of all the animations meant to be configured trough the inspector and/or stored in the SimpleAnimationsManager's memory. More...
 

Private Member Functions

void Update ()
 

Private Attributes

HashSet< SimpleAnimationanimationsToStop = new HashSet<SimpleAnimation>()
 List of all the animations that should stopped so they will be removed from the "playingAnimations" list at the next frame. More...
 
HashSet< SimpleAnimationplayingAnimations = new HashSet<SimpleAnimation>()
 List of all the animations that are being played. More...
 

Detailed Description

Component used to control the behaviour of any SimpleAnimation

Definition at line 9 of file SimpleAnimationsManager.cs.

Member Function Documentation

◆ GetAnimation() [1/2]

SimpleAnimation UnityEngine.SimpleAnimationsManager.GetAnimation ( int  index)

Obtain an animation configured trough the inspector and stored in the SimpleAnimationsManager's memory.

Index of the animation in the inspector if the SimpleAnimationsManager component.

Definition at line 20 of file SimpleAnimationsManager.cs.

Here is the caller graph for this function:

◆ GetAnimation() [2/2]

SimpleAnimation UnityEngine.SimpleAnimationsManager.GetAnimation ( string  animationName)

Returns the simple animation stored in this SimpleAnimationsManager witht he same name as the given.

Parameters
animationNameThe name of the wanted animation.
Returns

Definition at line 33 of file SimpleAnimationsManager.cs.

◆ Play() [1/4]

void UnityEngine.SimpleAnimationsManager.Play ( int  index,
bool  resume = false 
)

Starts playing the animation.

Parameters
indexThe index of animation in the 'SimpleAnimationsManager' that is wanted to be played.
resumeIf the animation should continue where it was left (true) or restart (false, default).

Definition at line 85 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:

◆ Play() [2/4]

void UnityEngine.SimpleAnimationsManager.Play ( SimpleAnimation  animation,
bool  resume = false 
)

Starts playing the animation.

Parameters
animationThe animation that is wanted to be played.
resumeIf the animation should continue where it was left (true) or restart (false, default).

Definition at line 60 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Play() [3/4]

void UnityEngine.SimpleAnimationsManager.Play ( string  animationName)

Starts playing the animation.

Parameters
animationNameThe name of the animation in the 'SimpleAnimationsManager' that is wanted to be played.

Definition at line 104 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:

◆ Play() [4/4]

void UnityEngine.SimpleAnimationsManager.Play ( string  animationName,
bool  resume = false 
)

Starts playing the animation.

Parameters
animationNameThe name of the animation in the 'SimpleAnimationsManager' that is wanted to be played.
resumeIf the animation should continue where it was left (true) or restart (false, default).

Definition at line 75 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:

◆ SetProgress() [1/3]

void UnityEngine.SimpleAnimationsManager.SetProgress ( int  index,
float  progress 
)

Sets the animation at the given progress.

Parameters
indexThe index of animation in the 'SimpleAnimationsManager' that is wanted to be updated with the new progress.
progressThe progress of the animation [0,1]

Definition at line 173 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:

◆ SetProgress() [2/3]

void UnityEngine.SimpleAnimationsManager.SetProgress ( SimpleAnimation  animation,
float  progress 
)

Sets the animation at the given progress.

Parameters
animationThe animation in the 'SimpleAnimationsManager' that is wanted to be updated with the new progress.
progressThe progress of the animation [0,1]

Definition at line 153 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetProgress() [3/3]

void UnityEngine.SimpleAnimationsManager.SetProgress ( string  animationName,
float  progress 
)

Sets the animation at the given progress.

Parameters
animationNameThe name of the animation in the 'SimpleAnimationsManager' that is wanted to be updated with the new progress.
progressThe progress of the animation [0,1]

Definition at line 163 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:

◆ Stop() [1/3]

void UnityEngine.SimpleAnimationsManager.Stop ( int  index)

Stops playing the animation.

Parameters
indexThe index of the animation in the 'SimpleAnimationsManager' that is wanted to be stopped.

Definition at line 113 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:

◆ Stop() [2/3]

void UnityEngine.SimpleAnimationsManager.Stop ( SimpleAnimation  animation)

Stops playing the animation.

Parameters
animationThe animation that is wanted to be stopped.

Definition at line 94 of file SimpleAnimationsManager.cs.

Here is the caller graph for this function:

◆ Stop() [3/3]

void UnityEngine.SimpleAnimationsManager.Stop ( string  animationName)

Stops playing the animation.

Parameters
animationNameThe name of the animation in the 'SimpleAnimationsManager' that is wanted to be stopped.

Definition at line 122 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:

◆ Update()

void UnityEngine.SimpleAnimationsManager.Update ( )
private

Definition at line 127 of file SimpleAnimationsManager.cs.

Here is the call graph for this function:

Member Data Documentation

◆ animations

List<ISimpleAnimation> UnityEngine.SimpleAnimationsManager.animations

List of all the animations meant to be configured trough the inspector and/or stored in the SimpleAnimationsManager's memory.

This animations can be played/stopped using the methods that require an index instead of a SimpleAnimation object.

Definition at line 15 of file SimpleAnimationsManager.cs.

◆ animationsToStop

HashSet<SimpleAnimation> UnityEngine.SimpleAnimationsManager.animationsToStop = new HashSet<SimpleAnimation>()
private

List of all the animations that should stopped so they will be removed from the "playingAnimations" list at the next frame.

Definition at line 48 of file SimpleAnimationsManager.cs.

◆ playingAnimations

HashSet<SimpleAnimation> UnityEngine.SimpleAnimationsManager.playingAnimations = new HashSet<SimpleAnimation>()
private

List of all the animations that are being played.

Definition at line 53 of file SimpleAnimationsManager.cs.


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