DodongosQuest.AreaOfEffect.Draw C# (CSharp) Méthode

Draw() public méthode

public Draw ( GameTime gameTime, Vector2 targetIndex ) : void
gameTime Microsoft.Xna.Framework.GameTime
targetIndex Vector2
Résultat void
        public void Draw(GameTime gameTime, Vector2 targetIndex)
        {
            Dictionary<Vector2, double> affectedWorldIndices = GetAffectedWorldIndices(targetIndex);

            foreach (KeyValuePair<Vector2, double> x in affectedWorldIndices)
            {
                Vector2 worldPosition = _world.ConvertTileIndexToWorldPosition(x.Key.X, x.Key.Y);
                Vector2 screenPosition = Camera.GetScreenPosition(worldPosition);
                Color color = new Color(new Vector4(1, 1, 1, (float)x.Value));
                GraphicsHelper.spriteBatch.Draw(_affectedTileImage, screenPosition, null, color, 0f, new Vector2(0, 0), 1f, SpriteEffects.None, 0.6f);
            }
        }