예제 #1
0
        private void GetFrametoDraw()
        {
            switch (state)
            {
            case State.Exploding:
                xVelocity = yVelocity = 0;
                if (Explode.curFrameID < 2)
                {
                    sourceRectangle = Explode.GetFrame(ref StateTimer);
                }
                else
                {
                    canRemove = true;
                }
                break;

            case State.Bouncing:
                sourceRectangle = Bounce.GetFrame(ref StateTimer);
                yVelocity      += fall_velocity;
                break;

            default:
                sourceRectangle = Bounce.GetFrame(ref StateTimer);
                break;
            }
            positionRectangle.Width  = sourceRectangle.Width;
            positionRectangle.Height = sourceRectangle.Height;
        }