public PlayerModel(World world, Vector2 position, int width, int height) : base(world) { this.Position = position; this.width = width; this.height = height; }
public MouseController(World world, InputType type, PlayerIndex playerIndex) { this.world = world; inputManager = new InputManager(type, playerIndex); keyMap = new Dictionary<WorldAction, Inputs>(); keyMap.Add(WorldAction.AddBall, Inputs.A); keyMap.Add(WorldAction.AddTile, Inputs.B); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); blockTexture = Content.Load<Texture2D>("block"); world = new World(); // Views playerView = new PlayerView(world.player1, blockTexture); // Controllers player1Controller = new PlayerController(world.player1, InputType.Keyboard, PlayerIndex.One); mouseController = new MouseController(world, InputType.Mouse, PlayerIndex.One); }
public Model(World world) { this.world = world; }