Exemplo n.º 1
0
        public GameObject2D(BaseGame theGame, Texture2D theTexture)
            : base(theGame)
        {
            game = theGame;
            texture = theTexture;
            position = new Vector2(0.5f, 0.5f);

            Initialize();
        }
Exemplo n.º 2
0
        public GameObject2D(BaseGame theGame, string theTexture, Vector2 thePosition, float theRotation, float setScaleX, float setScaleY, Color setColor)
            : base(theGame)
        {
            game = theGame;
            texture = game.Content.Load<Texture2D>(theTexture);
            position = thePosition;
            rotation = theRotation;
            scaleX = setScaleX;
            scaleY = setScaleY;
            color = setColor;

            Initialize();
        }
Exemplo n.º 3
0
 public Line2D(BaseGame game, Vector2 position, float rotation, float width, float length, Color color)
     : base(game, "smallRect", position, rotation, length / 50.0f, width / 5.0f, color)
 {
 }
Exemplo n.º 4
0
 public GameObject2DAbstract(BaseGame theGame)
 {
     game = theGame;                                             /**graphicsDeviceManager = theGame.GraphicsDeviceManager; **/
 }
Exemplo n.º 5
0
 public BaseGame()
 {
     graphics = new GraphicsDeviceManager( this );
     //graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>( graphics_PreparingDeviceSettings );
     clientRec = Window.ClientBounds;
     curInstance = this;
     //graphics.ToggleFullScreen();
 }
Exemplo n.º 6
0
 public GamePause(BaseGame theGame)
     : base(theGame)
 {
     Input.SetActionOnTriggered(Keys.P, delegate(GameTime time) { game.GoToPreviousLevel(); });
 }
Exemplo n.º 7
0
 public Line2D(BaseGame game, Vector2 position, float rotation, float width, float length, Color color)
     : base(game, "smallRect", position, rotation, length / 50.0f, width / 5.0f, color)
 {
 }
Exemplo n.º 8
0
 public GameObject2DAbstract(BaseGame theGame)
 {
     game = theGame; /**graphicsDeviceManager = theGame.GraphicsDeviceManager; **/
 }
Exemplo n.º 9
0
        public GeomCloneMenu(BaseGame game)
            : base(game)
        {
            font = game.Content.Load<SpriteFont>("GeomCloneFont");
            menuItems = new System.Collections.ArrayList();
            menuActions = new Dictionary<int, Input.Action>();

            Input.SetActionOnTriggered(Microsoft.Xna.Framework.Input.Keys.Down, ScrollMenuDown);
            Input.SetActionOnTriggered(Microsoft.Xna.Framework.Input.Keys.Up, ScrollMenuUp);
            Input.SetActionOnTriggered(Microsoft.Xna.Framework.Input.Keys.Space, ActivateMenuItem);

            Input.SetActionOnTriggered(PlayerIndex.One, Microsoft.Xna.Framework.Input.Buttons.LeftThumbstickDown, ScrollMenuDown);
            Input.SetActionOnTriggered(PlayerIndex.One, Microsoft.Xna.Framework.Input.Buttons.LeftThumbstickUp, ScrollMenuUp);
            Input.SetActionOnTriggered(PlayerIndex.One, Microsoft.Xna.Framework.Input.Buttons.A, ActivateMenuItem);
        }