public void Draw()
 {
     if (_collisionLocation != null)
     {
         _collision?.Draw((Vector2)_collisionLocation);
     }
     _sprite.Draw(_location);
 }
Exemple #2
0
        public void Draw()
        {
            _background?.Draw(Vector2.Zero);

            foreach (var roomDrawable in _room.Drawables)
            {
                roomDrawable.Draw();
            }
        }
Exemple #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);
        }
Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #6
0
 public virtual void Draw()
 {
     _drawnSprite?.Draw(Location.ToVector2());
 }
 public void Draw(SpriteBatch spriteBatch)
 {
     sprite.Draw(spriteBatch, this.Location);
 }
Exemple #8
0
 public void Draw(SpriteBatch spriteBatch, Vector2 location)
 {
     pipeSprite.Draw(spriteBatch, location, Color.White);
 }
Exemple #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);
 }
 public void Draw(SpriteBatch spriteBatch)
 {
     sprite.Draw(spriteBatch);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #13
0
 //Draws the sprite attached to the state
 public void Draw(SpriteBatch spriteBatch, Color color)
 {
     sprite.Draw(spriteBatch, color, link.Position);
 }
Exemple #14
0
 public void Draw()
 {
     _sprite?.Draw(_location.ToVector2());
 }
Exemple #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);
 }
Exemple #17
0
 public void Draw(SpriteBatch spriteBatch)
 {
     blockSprite.Draw(spriteBatch, BlockPhysics.Position);
 }
Exemple #18
0
 public void Draw(SpriteBatch spritebatch) => sprite.Draw(spritebatch);
Exemple #19
0
 public void Draw(Vector2 position, ISprite enemySprite)
 {
     enemySprite.Draw(position);
 }
Exemple #20
0
 public void Draw(SpriteBatch spriteBatch)
 {
     sprite.Draw(spriteBatch, body.BottomCenter, facingRight);
 }
 public void Draw()
 {
     _background?.Draw(Vector2.Zero);
     Scene?.Draw();
 }
Exemple #22
0
 public void Draw(SpriteBatch spriteBatch)
 {
     MySprite.Draw(spriteBatch, Location);
 }
Exemple #23
0
 /// <inheritdoc/>
 public void Draw()
 {
     sprite.Draw(Physics.Location, spriteTint, Physics.Depth);
 }
Exemple #24
0
 public void Draw()
 {
     _sprite?.Draw(_drawLocation);
 }
 public void Draw(SpriteBatch spriteBatch, Vector2 location)
 {
     sprite.Draw(spriteBatch, location);
 }
Exemple #26
0
 public void Draw(SpriteBatch spriteBatch, Vector2 position)
 {
     sprite.Draw(spriteBatch, position);
 }
Exemple #27
0
 public void Draw()
 {
     _sprite.Draw(_location);
 }
Exemple #28
0
 public void Draw(int time, SpriteBatch spriteBatch)
 {
     sprite?.Draw(time, spriteBatch, new Rectangle(Boundary.Location, Boundary.Size));
 }
 public void Draw(SpriteBatch spriteBatch)
 {
     itemSprite.Draw(spriteBatch, DestinationRectangle);
 }
Exemple #30
0
 public void Draw(SpriteBatch spriteBatch)
 {
     //Draw current item
     sprite.Draw(spriteBatch);
 }
 public void Draw(SpriteBatch spriteBatch, Vector2 cameraLoc)
 {
     sprite.Draw(spriteBatch, cameraLoc);
 }