Exemple #1
0
    public bool hasObject(IP2DAnimate testObject)
    {
        if (animateObject == testObject)
        {
            return(true);
        }

        return(false);
    }
Exemple #2
0
    private void InitAnimate(IP2DAnimate AnimateObject, float Time, AnimateType Type, float StartDelay)
    {
        animateObject = AnimateObject;
        time          = Time;
        type          = Type;
        startDelay    = StartDelay;

        SetStartStatus();
    }
Exemple #3
0
 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);
     //    }
     //}
 }
Exemple #4
0
    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));
    }
Exemple #5
0
    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);
    }
Exemple #6
0
 public AnimateStructP2D(IP2DAnimate AnimateObject, float AnimateTime, AnimateType Type = AnimateType.linear, float StartDelay = 0)
 {
     InitAnimate(AnimateObject, AnimateTime, Type, StartDelay);
 }