Ejemplo n.º 1
0
        public Enemy(ContentManager content, Vector2 position, GraphicsDevice graphics)
            : base(content, position, graphics)
        {
            _texture = content.Load <Texture2D>("Actor/Enemy1/EnemyBody");
            Origin   = new Vector2(_texture.Width / 2, _texture.Height / 2);

            SetBorder(graphics);

            var tailTexture = content.Load <Texture2D>("Actor/Enemy1/EnemyTail");

            _tail = new Sprite(tailTexture)
            {
                Position = new Vector2(Position.X + (_texture.Width / 2),
                                       Position.Y + ((_texture.Height / 2) - (tailTexture.Height / 2)) + 10),
            };

            SetLeftHand(content.Load <Texture2D>("Actor/Enemy1/EnemyRHand"));

            SetRightHand(content.Load <Texture2D>("Actor/Enemy1/EnemyLHand"));

            ActionResult = new Engine.ActionResult()
            {
                State = Engine.ActionStates.Waiting,
            };

            _turnBar = new TurnBar(content, new Vector2(Position.X, (Position.Y + Origin.Y) + 15));

            this._equipment = new Equipments.Fists(LeftHand, RightHand);
        }
Ejemplo n.º 2
0
        public Player(ContentManager content, Vector2 position, GraphicsDevice graphics)
            : base(content, position, graphics)
        {
            _texture = content.Load <Texture2D>("Actor/Body");
            Origin   = new Vector2(_texture.Width / 2, _texture.Height / 2);

            SetBorder(graphics);

            SetLeftHand(content.Load <Texture2D>("Actor/Hand"));

            SetRightHand(content.Load <Texture2D>("Actor/Hand"));

            ActionResult = new Engine.ActionResult()
            {
                Action = Attack,
                State  = Engine.ActionStates.Waiting,
            };

            _turnBar = new TurnBar(content, new Vector2(Position.X, (Position.Y + Origin.Y) + 15));
        }