Ejemplo n.º 1
0
 public PlayerModel(World world, Vector2 position, int width, int height)
     : base(world)
 {
     this.Position = position;
       this.width = width;
       this.height = height;
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public Model(World world)
 {
     this.world = world;
 }