public PlayerController(PlayerModel player, InputType type, PlayerIndex playerIndex)
        {
            this.player = player;
              inputManager = new InputManager(type, playerIndex);
              keyMap = new Dictionary<PlayerAction, Inputs>();

              // Map actions to keys
              keyMap.Add(PlayerAction.MoveUp, Inputs.Up);
              keyMap.Add(PlayerAction.MoveDown, Inputs.Down);
              keyMap.Add(PlayerAction.MoveLeft, Inputs.Left);
              keyMap.Add(PlayerAction.MoveRight, Inputs.Right);
        }
Example #2
0
 public PlayerView(PlayerModel player, Texture2D sprite)
 {
     this.player = player;
       this.sprite = sprite;
 }
Example #3
0
 public World()
 {
     // Object Instantiation
       player1 = new PlayerModel(this, new Vector2(100, 100), 100, 100);
 }