Exemple #1
0
 public InputControllerImpl(Sprint3 game, PlayerIndex?playerIndex) : base(game)
 {
     this.previousStateK = Keyboard.GetState();
     if (playerIndex != null)
     {
         this.previousStateG = GamePad.GetState(playerIndex.Value);
     }
     if (playerIndex.HasValue)
     {
         this.playerIndex = playerIndex.Value;
     }
 }
        public SpriteKoopa(Sprint3 game, string color) : base(game)
        {
            this.Info.frameDelay   = 10;
            this.Info.bounce       = true;
            this.Info.harmfulIndex = 1;

            this.RegisterState(SpriteStates.Sheets.NORMAL, SpriteStates.Sprites.WALKING, "Sprites/Enemies/Koopa/" + color + "/moving");
            this.RegisterState(SpriteStates.Sheets.SHELL, SpriteStates.Sprites.SHELLED, "Sprites/Enemies/Koopa/" + color + "/shell");
            this.RegisterState(SpriteStates.Sheets.NORMAL, SpriteStates.Sprites.JUMPING, "Sprites/Enemies/Koopa/" + color + "/flying");

            this.SetSheetState(SpriteStates.Sheets.NORMAL);
            this.SetSpriteState(SpriteStates.Sprites.WALKING);
        }