public GameObject2D(BaseGame theGame, Texture2D theTexture) : base(theGame) { game = theGame; texture = theTexture; position = new Vector2(0.5f, 0.5f); Initialize(); }
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(); }
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) { }
public GameObject2DAbstract(BaseGame theGame) { game = theGame; /**graphicsDeviceManager = theGame.GraphicsDeviceManager; **/ }
public BaseGame() { graphics = new GraphicsDeviceManager( this ); //graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>( graphics_PreparingDeviceSettings ); clientRec = Window.ClientBounds; curInstance = this; //graphics.ToggleFullScreen(); }
public GamePause(BaseGame theGame) : base(theGame) { Input.SetActionOnTriggered(Keys.P, delegate(GameTime time) { game.GoToPreviousLevel(); }); }
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); }