Beispiel #1
0
        private void AnimationHandeler()
        {
            switch (animState)
            {
            case "v":
                playerSprite.SetFrame(0);
                break;

            case "<":
                playerSprite.SetFrame(2);
                playerSprite.Mirror(false, false);
                break;

            case ">":
                playerSprite.SetFrame(2);
                playerSprite.Mirror(true, false);
                break;

            case "^":
                playerSprite.SetFrame(1);
                break;
            }
        }
 public Intercept(Scoring score, bool mirrored, int width, int height) : base(width, height)
 {
     this.score = score;
     Rect(0, game.height / 2, width, height);
     _mirrored = mirrored;
     bar.SetOrigin(bar.width / 2, 0);
     if (!mirrored)
     {
         x = (game.width / 2) - distance;
     }
     else
     {
         x            = (game.width / 2) + distance;
         thisKey      = Key.X;
         thisArrowKey = Key.RIGHT;
     }
     bar.Mirror(mirrored, false);
     bar.currentFrame = bar.frameCount;
     bar.width        = 100;
     AddChild(bar);
 }