Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
Arquivo: Player.cs Projeto: hantor/EOD
        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);
        }
Exemplo n.º 3
0
Arquivo: Player.cs Projeto: hantor/EOD
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }