public static Add ( ISpriteAnimatable s ) : void | ||
s | ISpriteAnimatable | |
return | void |
protected void AddToAnimatedList() { if (this.animating || !Application.isPlaying || !base.gameObject.activeInHierarchy) { return; } this.animating = true; SpriteAnimationPump.Add(this); }
// Adds the sprite to the list of currently // animating sprites: protected override void AddToAnimatedList() { // Check to see if the coroutine is running, // and if not, start it: // if (!SpriteAnimationPump.pumpIsRunning) // SpriteAnimationPump.Instance.StartAnimationPump(); // If we're already animating, then we're // already in the list, no need to add again. // Also, if we're inactive, also don't add: if (animating || !Application.isPlaying || !gameObject.active) { return; } animating = true; SpriteAnimationPump.Add(this); }
// Adds the sprite to the list of currently // animating sprites: protected override void AddToAnimatedList() { // Check to see if the coroutine is running, // and if not, start it: // if (!SpriteAnimationPump.pumpIsRunning) // SpriteAnimationPump.Instance.StartAnimationPump(); // If we're already animating, then we're // already in the list, no need to add again. // Also, if we're inactive, also don't add: #if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9 if (animating || !Application.isPlaying || !gameObject.activeInHierarchy) #else if (animating || !Application.isPlaying || !gameObject.active) #endif { return; } animating = true; currentlyAnimating = true; SpriteAnimationPump.Add(this); }