Java 类org.newdawn.slick.state.transition.CrossStateTransition 实例源码

项目:trashjam2017    文件:TestState1.java   
/**
 * @see org.newdawn.slick.state.BasicGameState#keyReleased(int, char)
 */
public void keyReleased(int key, char c) {

    if (key == Input.KEY_2) {
        GameState target = game.getState(TestState2.ID);

        final long start = System.currentTimeMillis();
        CrossStateTransition t = new CrossStateTransition(target) {             
            public boolean isComplete() {
                return (System.currentTimeMillis() - start) > 2000;
            }

            public void init(GameState firstState, GameState secondState) {
            }
        };

        game.enterState(TestState2.ID, t, new EmptyTransition());
    }
    if (key == Input.KEY_3) {
        game.enterState(TestState3.ID, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
    }
}
项目:Progetto-C    文件:TestState1.java   
/**
 * @see org.newdawn.slick.state.BasicGameState#keyReleased(int, char)
 */
public void keyReleased(int key, char c) {

    if (key == Input.KEY_2) {
        GameState target = game.getState(TestState2.ID);

        final long start = System.currentTimeMillis();
        CrossStateTransition t = new CrossStateTransition(target) {             
            public boolean isComplete() {
                return (System.currentTimeMillis() - start) > 2000;
            }

            public void init(GameState firstState, GameState secondState) {
            }
        };

        game.enterState(TestState2.ID, t, new EmptyTransition());
    }
    if (key == Input.KEY_3) {
        game.enterState(TestState3.ID, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
    }
}
项目:BaseClient    文件:TestState1.java   
/**
 * @see org.newdawn.slick.state.BasicGameState#keyReleased(int, char)
 */
public void keyReleased(int key, char c) {

    if (key == Input.KEY_2) {
        GameState target = game.getState(TestState2.ID);

        final long start = System.currentTimeMillis();
        CrossStateTransition t = new CrossStateTransition(target) {             
            public boolean isComplete() {
                return (System.currentTimeMillis() - start) > 2000;
            }

            public void init(GameState firstState, GameState secondState) {
            }
        };

        game.enterState(TestState2.ID, t, new EmptyTransition());
    }
    if (key == Input.KEY_3) {
        game.enterState(TestState3.ID, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
    }
}
项目:GPVM    文件:TestState1.java   
/**
 * @see org.newdawn.slick.state.BasicGameState#keyReleased(int, char)
 */
public void keyReleased(int key, char c) {

    if (key == Input.KEY_2) {
        GameState target = game.getState(TestState2.ID);

        final long start = System.currentTimeMillis();
        CrossStateTransition t = new CrossStateTransition(target) {             
            public boolean isComplete() {
                return (System.currentTimeMillis() - start) > 2000;
            }

            public void init(GameState firstState, GameState secondState) {
            }
        };

        game.enterState(TestState2.ID, t, new EmptyTransition());
    }
    if (key == Input.KEY_3) {
        game.enterState(TestState3.ID, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
    }
}
项目:SpaceStationAlpha    文件:TestState1.java   
/**
 * @see org.newdawn.slick.state.BasicGameState#keyReleased(int, char)
 */
public void keyReleased(int key, char c) {

    if (key == Input.KEY_2) {
        GameState target = game.getState(TestState2.ID);

        final long start = System.currentTimeMillis();
        CrossStateTransition t = new CrossStateTransition(target) {             
            public boolean isComplete() {
                return (System.currentTimeMillis() - start) > 2000;
            }

            public void init(GameState firstState, GameState secondState) {
            }
        };

        game.enterState(TestState2.ID, t, new EmptyTransition());
    }
    if (key == Input.KEY_3) {
        game.enterState(TestState3.ID, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
    }
}
项目:cretion    文件:TestState1.java   
/**
 * @see org.newdawn.slick.state.BasicGameState#keyReleased(int, char)
 */
public void keyReleased(int key, char c) {

    if (key == Input.KEY_2) {
        GameState target = game.getState(TestState2.ID);

        final long start = System.currentTimeMillis();
        CrossStateTransition t = new CrossStateTransition(target) {             
            public boolean isComplete() {
                return (System.currentTimeMillis() - start) > 2000;
            }

            public void init(GameState firstState, GameState secondState) {
            }
        };

        game.enterState(TestState2.ID, t, new EmptyTransition());
    }
    if (key == Input.KEY_3) {
        game.enterState(TestState3.ID, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
    }
}
项目:slick2d-maven    文件:TestState1.java   
/**
 * @see org.newdawn.slick.state.BasicGameState#keyReleased(int, char)
 */
public void keyReleased(int key, char c) {

    if (key == Input.KEY_2) {
        GameState target = game.getState(TestState2.ID);

        final long start = System.currentTimeMillis();
        CrossStateTransition t = new CrossStateTransition(target) {             
            public boolean isComplete() {
                return (System.currentTimeMillis() - start) > 2000;
            }

            public void init(GameState firstState, GameState secondState) {
            }
        };

        game.enterState(TestState2.ID, t, new EmptyTransition());
    }
    if (key == Input.KEY_3) {
        game.enterState(TestState3.ID, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
    }
}