예제 #1
0
 private void switchState(GlitchPlayerState newState)
 {
     pauseAnimation = false;
     currentState   = newState;
     spriteSheet.setCurrentSegment((Int32)newState);
     currentFrame = spriteSheet.currentSegment.startFrame;
 }
예제 #2
0
        /*
         * Implement the State Pattern!
         */
        private void switchState(GlitchPlayerState newState)
        {
            pauseAnimation = false; // just in case

            // switch the state to the given state
            currentState = newState;
            spriteSheet.setCurrentSegment((Int32)newState);
            currentFrame = spriteSheet.currentSegment.startFrame;
        }
예제 #3
0
        /*
         * Implement the State Pattern!
         */
        private void switchState(GlitchPlayerState newState)
        {
            pauseAnimation = false; // just in case

            // switch the state to the given state
            currentState = newState;
            spriteSheet.setCurrentSegment((Int32)newState);
            currentFrame = spriteSheet.currentSegment.startFrame;
        }
예제 #4
0
        /*
         * Implement the State Pattern!
         */
        private void switchState(GlitchPlayerState newState)
        {
            pauseAnimation = false; // just in case

            // switch the state to the given state
            currentState = newState;
            spriteSheet.setCurrentSegment((Int32)newState);
            if (isSS)
            {
                spriteSheet.setCurrentSegment((Int32)newState + 5);
                // currentFrame = spriteSheet.currentSegment.startFrame;
            }
            System.Diagnostics.Debug.WriteLine(spriteSheet.segments.Length);
            currentFrame = spriteSheet.currentSegment.startFrame;
        }