Category5.Victim.Draw C# (CSharp) Метод

Draw() публичный Метод

Draws the appropreate animation given the current graphics device
public Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch sprite batch from the game drawing window
Результат void
        public virtual void Draw(SpriteBatch batch)
        {
            switch (state)
            {
                case State.Exploding:
                    if (Input.KeyboardState.IsKeyUp(Microsoft.Xna.Framework.Input.Keys.L))
                    {
                        ExplodeAnimation.Draw(batch, this.bounds, drawAngle);
                    }
                    else
                    {
                        ExplodeAnimation.FastDraw(batch, this.bounds.Rectangle);
                    }
                    break;
                case State.Flying:
                    if (Input.KeyboardState.IsKeyUp(Microsoft.Xna.Framework.Input.Keys.L))
                    {
                        TornadoAnimation.Draw(batch, this.bounds, drawAngle);
                    }
                    else
                    {
                        TornadoAnimation.FastDraw(batch, this.bounds.Rectangle);
                    }
                    break;
                case State.Ground:
                    if (Input.KeyboardState.IsKeyUp(Microsoft.Xna.Framework.Input.Keys.L))
                    {
                        GroundAnimation.Draw(batch, this.bounds, drawAngle);
                    }
                    else
                    {
                        GroundAnimation.FastDraw(batch, this.bounds.Rectangle);
                    }
                    break;
                case State.Stump:
                    if (Input.KeyboardState.IsKeyUp(Microsoft.Xna.Framework.Input.Keys.L))
                    {
                        StumpAnimation.Draw(batch, this.bounds, drawAngle);
                    }
                    else
                    {
                        StumpAnimation.FastDraw(batch, this.bounds.Rectangle);
                    }
                    break;
            }
        }