コード例 #1
0
        public void Draw(Character character, CharacterTypes type)
        {
            _renderer.Begin();

            var sprite = _textureLookup[(int)type];

            var position = character.Position;

            _renderer.Draw(sprite, new Vector2(position.X, position.Y));

            _renderer.End();
        }
コード例 #2
0
        /// <summary> Draws all of the grids that are around the center of the camera. </summary>
        public void Draw()
        {
            _renderer.Begin();

            foreach (var item in _worldView.VisibleGridItems.Data)
            {
                if (item.GridItem.Type == TileType.Default)
                {
                    continue;
                }

                var sprite = GetSprite(item.GridItem);

                var rotation = (float)Math.PI / 2.0f * item.GridItem.Variant;

                _renderer.Draw(sprite, new Vector2(item.Position.X + .5f, item.Position.Y + .5f), rotation);
            }

            _renderer.End();
        }
コード例 #3
0
 public void Begin()
 => _textureRenderer.Begin();