public bool hasObject(IP2DAnimate testObject) { if (animateObject == testObject) { return(true); } return(false); }
private void InitAnimate(IP2DAnimate AnimateObject, float Time, AnimateType Type, float StartDelay) { animateObject = AnimateObject; time = Time; type = Type; startDelay = StartDelay; SetStartStatus(); }
private void CheckExistingAnimate(IP2DAnimate animateObject) { //for (int i = 0; i < animations.Count; i++) //{ // if (animations[i].hasObject(animateObject)) // { // if (!animations[i].isEnd) // { // animations[i].immediateEnd(); // Debug.Log("ImmediateEnd"); // } // animations.RemoveAt(i); // } //} }
public void Add(IP2DAnimate animateObject, Vector2 startPosition, Vector2 endPosition, float time, AnimateType Type = AnimateType.linear, float startDelay = 0) { CheckExistingAnimate(animateObject); animations.Add(new AnimateStructP2D(animateObject, startPosition, endPosition, time, Type, startDelay)); }
public AnimateStructP2D(IP2DAnimate AnimateObject, Vector2 StartPosition, Vector2 EndPosition, float AnimateTime, AnimateType Type = AnimateType.linear, float StartDelay = 0) { InitAnimate(AnimateObject, AnimateTime, Type, StartDelay); AddMoveToAnimate(StartPosition, EndPosition); }
public AnimateStructP2D(IP2DAnimate AnimateObject, float AnimateTime, AnimateType Type = AnimateType.linear, float StartDelay = 0) { InitAnimate(AnimateObject, AnimateTime, Type, StartDelay); }