Beispiel #1
0
 public Animation()
 {
     pictures           = new List <Texture2D>();
     totalElapsed       = 0;
     playedOnce         = false;
     pingpong           = false;
     totalElapsed       = 0;
     amount             = 0;
     looped             = false;
     scale              = new Vector2(1, 1);
     rotation           = 0;
     StartInMiliseconds = 0;
     State              = AnimationState.Stop;
     Timer.OnTimeout del = StartOnTimeOut;
     StartTimer = new Timer(StartInMiliseconds, del);
     TimerManager.Timers.Remove(StartTimer);
     StartTimer.Active = false;
 }
Beispiel #2
0
        public Animation(String fullpath, int amount, float speed, OnFinish todo, int startInMiliseconds)
        {
            // Der fullpath muss bis zum Unterstrich vor der Zahl angegeben werden!!
            amount             = 0;
            pictures           = new List <Texture2D>();
            totalElapsed       = 0;
            this.playedOnce    = false;
            this.fullpath      = fullpath;
            this.amount        = amount;
            this.Speed         = speed;
            this.looped        = true;
            this.position      = Vector2.Zero;
            Handler            = todo;
            State              = AnimationState.Stop;
            StartInMiliseconds = startInMiliseconds;
            Handler            = todo;

            Timer.OnTimeout del = StartOnTimeOut;
            StartTimer = new Timer(StartInMiliseconds, del);
            TimerManager.Timers.Remove(StartTimer);
            StartTimer.Active = false;
        }