Ejemplo n.º 1
0
 public void Draw()
 {
     if (_collisionLocation != null)
     {
         _collision?.Draw((Vector2)_collisionLocation);
     }
     _sprite.Draw(_location);
 }
Ejemplo n.º 2
0
        public void Draw()
        {
            _background?.Draw(Vector2.Zero);

            foreach (var roomDrawable in _room.Drawables)
            {
                roomDrawable.Draw();
            }
        }
Ejemplo n.º 3
0
        private void DrawExtraItem(ISprite sprite, Vector2 location8_16)
        {
            var drawLocation = new Vector2(location8_16.X, location8_16.Y);

            if (sprite != null && sprite.Width > 8)
            {
                drawLocation.X -= 4;
            }

            sprite?.Draw(drawLocation + GridLocation + _location);
        }
Ejemplo n.º 4
0
        public void Draw()
        {
            Background.Draw(_location);
            CursorGrid.Draw(CursorSize * _cursorPosition.ToVector2() + GridLocation + _location);
            _selectedItem?.Draw(_location + SelectedItemLocation);

            var dungeonManager = (DungeonManager)_agent.DungeonManager;
            var currentRoom    = _agent.DungeonManager.CurrentRoom.ToVector2();
            var visitedRooms   = dungeonManager.VisitedRooms;

            if (dungeonManager.CurrentRoomMapped)
            {
                PlayerMapDot.Draw(MapGridCoverSize * currentRoom + MapGridLocation + _location);
            }

            for (var row = 0; row < visitedRooms.Length; row++)
            {
                for (var col = 0; col < visitedRooms[row].Length; col++)
                {
                    if (!visitedRooms[row][col])
                    {
                        RoomCover.Draw(MapGridCoverSize * new Vector2(col, row) + MapGridLocation + _location);
                    }
                }
            }

            if (_agent.Player.Inventory.HasMap)
            {
                Map.Draw(MapLocation + _location);
            }
            if (_agent.Player.Inventory.HasCompass)
            {
                Compass.Draw(CompassLocation + _location);
            }
            if (_agent.Player.Inventory.HasArrow)
            {
                Arrow.Draw(ArrowLocation + GridLocation + _location);
            }
            if (_agent.Player.Inventory.HasBow)
            {
                Bow.Draw(BowLocation + GridLocation + _location);
            }
            if (_agent.Player.Inventory.HasBoomerang)
            {
                Boomerang.Draw(BoomerangLocation + GridLocation + _location);
            }
            if (_agent.Player.Inventory.BombCount >= 1)
            {
                Bomb.Draw(BombLocation + GridLocation + _location);
            }
        }
Ejemplo n.º 5
0
        public void Draw(Vector2 location)
        {
            if (!Enabled)
            {
                _sprite?.Draw(location);
            }
            else
            {
                if (_hidden)
                {
                    return;
                }

                SpriteBatch.Draw(_opaque ? OpaqueMaskTexture : TransparentMaskTexture, location + new Vector2(0, _yOffset), null, Color.Black, 0f, Vector2.Zero,
                                 new Vector2(Width, Height), SpriteEffects.None, 0f);
            }
        }
Ejemplo n.º 6
0
 public virtual void Draw()
 {
     _drawnSprite?.Draw(Location.ToVector2());
 }
Ejemplo n.º 7
0
 public void Draw(SpriteBatch spriteBatch)
 {
     sprite.Draw(spriteBatch, this.Location);
 }
Ejemplo n.º 8
0
 public void Draw(SpriteBatch spriteBatch, Vector2 location)
 {
     pipeSprite.Draw(spriteBatch, location, Color.White);
 }
Ejemplo n.º 9
0
 protected override void OnDraw(int time, SpriteBatch spriteBatch)
 {
     textSprite.Draw(time, spriteBatch, textDestination);
     coinSprite.Draw(time, spriteBatch, coinDestination);
     oneUpSprite.Draw(time, spriteBatch, oneUpDestination);
 }
Ejemplo n.º 10
0
 public void Draw(SpriteBatch spriteBatch)
 {
     sprite.Draw(spriteBatch);
 }
Ejemplo n.º 11
0
 protected override void OnDraw(int time, SpriteBatch spriteBatch)
 {
     startSprite.Draw(time, spriteBatch, startDestinationRect);
     titleSprite.Draw(time, spriteBatch, titleDestinationRect);
     menuSprite.Draw(time, spriteBatch, menuDestinationRect);
 }
Ejemplo n.º 12
0
 public void Draw(ISprite sprite, int x, int y, Microsoft.Xna.Framework.Graphics.SpriteEffects facing)
 {
     if(sprite != null) sprite.Draw(x-xPos, y, facing);
 }
Ejemplo n.º 13
0
 //Draws the sprite attached to the state
 public void Draw(SpriteBatch spriteBatch, Color color)
 {
     sprite.Draw(spriteBatch, color, link.Position);
 }
Ejemplo n.º 14
0
 public void Draw()
 {
     _sprite?.Draw(_location.ToVector2());
 }
Ejemplo n.º 15
0
 public void Draw(SpriteBatch spriteBatch, Vector2 location)
 {
     sprite.Draw(spriteBatch, location);
     //foreach (var fb in fireballs)
     //    fb.Draw(spriteBatch, fb.Position);
 }
 public override void Draw(SpriteBatch spriteBatch, Vector2 location)
 {
     smoothPlatformBlockSprite.Draw(spriteBatch, location, Color.White);
 }
Ejemplo n.º 17
0
 public void Draw(SpriteBatch spriteBatch)
 {
     blockSprite.Draw(spriteBatch, BlockPhysics.Position);
 }
Ejemplo n.º 18
0
 public void Draw(SpriteBatch spritebatch) => sprite.Draw(spritebatch);
Ejemplo n.º 19
0
 public void Draw(Vector2 position, ISprite enemySprite)
 {
     enemySprite.Draw(position);
 }
Ejemplo n.º 20
0
 public void Draw(SpriteBatch spriteBatch)
 {
     sprite.Draw(spriteBatch, body.BottomCenter, facingRight);
 }
Ejemplo n.º 21
0
 public void Draw()
 {
     _background?.Draw(Vector2.Zero);
     Scene?.Draw();
 }
Ejemplo n.º 22
0
 public void Draw(SpriteBatch spriteBatch)
 {
     MySprite.Draw(spriteBatch, Location);
 }
Ejemplo n.º 23
0
 /// <inheritdoc/>
 public void Draw()
 {
     sprite.Draw(Physics.Location, spriteTint, Physics.Depth);
 }
Ejemplo n.º 24
0
 public void Draw()
 {
     _sprite?.Draw(_drawLocation);
 }
Ejemplo n.º 25
0
 public void Draw(SpriteBatch spriteBatch, Vector2 location)
 {
     sprite.Draw(spriteBatch, location);
 }
Ejemplo n.º 26
0
 public void Draw(SpriteBatch spriteBatch, Vector2 position)
 {
     sprite.Draw(spriteBatch, position);
 }
Ejemplo n.º 27
0
 public void Draw()
 {
     _sprite.Draw(_location);
 }
Ejemplo n.º 28
0
 public void Draw(int time, SpriteBatch spriteBatch)
 {
     sprite?.Draw(time, spriteBatch, new Rectangle(Boundary.Location, Boundary.Size));
 }
Ejemplo n.º 29
0
 public void Draw(SpriteBatch spriteBatch)
 {
     itemSprite.Draw(spriteBatch, DestinationRectangle);
 }
Ejemplo n.º 30
0
 public void Draw(SpriteBatch spriteBatch)
 {
     //Draw current item
     sprite.Draw(spriteBatch);
 }
 public void Draw(SpriteBatch spriteBatch, Vector2 cameraLoc)
 {
     sprite.Draw(spriteBatch, cameraLoc);
 }