public StaticCrate(Game game) : base(game) { _iDrawManagerService = (IDrawManagerService)game.Services.GetService(typeof(IDrawManagerService)); SetTexture(_iDrawManagerService.SquareBlack); SetLayerDepth(0.5f); SetPositionX(800.0f); SetPositionY(300.0f); }
public Player(Game game) : base(game) { _iDrawManagerService = (IDrawManagerService)game.Services.GetService(typeof(IDrawManagerService)); _iKeyboardManagerService = (IKeyboardManagerService)game.Services.GetService(typeof(IKeyboardManagerService)); SetTexture(_iDrawManagerService.SquareWhite); SetLayerDepth(0.4f); SetPositionX(600.0f); SetPositionY(300.0f); }
public GameObject(Game game) { _iDrawManagerService = (IDrawManagerService)game.Services.GetService(typeof(IDrawManagerService)); _iDrawManagerService.AddGameObject(this); _texture = _iDrawManagerService.SquareWhite; _position = Vector2.Zero; _sourceRectangle = new Rectangle(0, 0, _texture.Width, _texture.Height); _color = Color.White; _rotation = 0.0f; _origin = new Vector2((float)_sourceRectangle.Width / 2.0f, (float)_sourceRectangle.Height / 2.0f); SetScale(new Vector2(1.0f, 1.0f)); SetEffects(SpriteEffects.None); SetLayerDepth(0.0f); }