public Game1() { gameInterface = new GameInterface(this); gameInterface.InitGraphicsDeviceManager(); //Definition in FPS Notes IsFixedTimeStep = true; }
public override void LoadContent(GameInterface gi, String fileName, bool pauseScreen) { PopUp = pauseScreen; _gameInterface = gi; background = new Background(gi, fileName); background.sprite.position = new Vector2(600, 450); background.sprite.scale = 1.0f; }
public TestObject(GameInterface gi) : base(ref gi) { position = new Vector2( (float)gi.random.Next(400), (float)gi.random.Next(400)); InitSprite("Assets/asteroid"); InitAnimation(new Vector2(8, 4), 30); InitPhysics(); physics.SetVel(rand(), rand()); InitCollision(); }
public GameMouse( GameInterface gi, string file) { _sprite = new Sprite(gi, file); _animation = new Animation(new Vector2(1, 1), 100, _sprite); _mouseButtonMaps = new Dictionary<MouseButtons, Func<MouseState, ButtonState>> { { MouseButtons.Left, s => s.LeftButton }, { MouseButtons.Right, s => s.RightButton }, { MouseButtons.Middle, s => s.MiddleButton }, }; }
public Sprite(GameInterface gameInterface, string file) { _gameInterface = gameInterface; _texture = _gameInterface.Content.Load<Texture2D>(file); _position = new Vector2(0,0); _tint = Color.White; _rotation = 0; _scale = 1; _layer = 1; _pivot = new Vector2(_texture.Width / 2, _texture.Height / 2); _SetRect(); }
public Background(GameInterface gi, string file) { _sprite = new Sprite(gi, file); _sprite.layer = 0.0f; size = new Vector2(_sprite.texture.Width * 20,_sprite.texture.Height * 20); }
public InputManager(GameInterface gi) { _mouse = new GameMouse(gi, "Assets/harpoon mouse"); _EVENT = new List<InputEvent>(); }
public virtual void LoadContent(GameInterface gi, String fileName, bool popUp) { }
// Constructor public GameObject(ref GameInterface gi) { _gi = gi; }
public void LoadContent(GameInterface gi) { content = new ContentManager(gi.Content.ServiceProvider, "Content"); currentScreen.LoadContent(gi, "BackGround/Bg1", false); }