Пример #1
0
        protected override void Initialize()
        {
            #if !XBOX
                controller = new Controller(ControllerType.PC);
            #else
                controller = new Controller(ControllerType.Xbox360);
            #endif

            #if !XBOX
                controller2 = new Controller(ControllerType.PC2);
            #else
                controller2 = new Controller(ControllerType.Xbox360);
            #endif

            player = new PlayerGameObject("player", new Vector2(0, 0),controller);
            player.zindex = 0.9f;

            player2 = new PlayerGameObject("player", new Vector2(120, 120), controller2);
            player2.zindex = 0.9f;

            map = new GameObject("map", new Vector2(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2));
            map.zindex = 0.2f;

            realMap = new GameObject("realmap", new Vector2(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2));
            map.zindex = 0.4f;

            base.Initialize();
        }
Пример #2
0
 public PlayerGameObject(String texturePath, Vector2 position, Controller controller)
     : base(texturePath, position)
 {
     this.controller = controller;
     this.speed = 1;
 }