Java 类org.newdawn.slick.state.GameState 实例源码

项目: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));
    }
}
项目:telyn    文件:Loader.java   
/**
 * Finaliza a execu��o do jogo.
 */
public static void leaveGame() {
    try {
        for (int i = 0; i < GAME.getStateCount(); i++) {
            GameState state = GAME.getState(i);
            if (state instanceof LevelState) {
                ((LevelState)state).currentScreenMode = LevelState.ScreenMode.Exit;         
            }
            GAME.getState(i).leave(GAME.getContainer(), GAME);          
        }
    } catch (SlickException e) {
        e.printStackTrace();
    }
}
项目:SpaceDefence    文件:Application.java   
@Override
  public boolean closeRequested(){
GameState currGS = this.getCurrentState();
if(currGS.getID() == GAME){
    ((Game) currGS).onClose();
}
System.exit(0); 
return false;
  }
项目:projectradon    文件:Entity.java   
public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException {
    ticksExisted++;
    GameState state = game.getCurrentState();
    if (!(state instanceof GameWorld)) return;
    world = (GameWorld) game.getCurrentState();

    prevX = x;
    prevY = y;
    x = body.getPosition().x;
    y = body.getPosition().y;
    angle = body.getAngle();
    velocity = body.getLinearVelocity();
}
项目:trashjam2017    文件:CombinedTransition.java   
public void init(GameState firstState, GameState secondState) {
   for (int i = transitions.size() - 1; i >= 0; i--) {
      ((Transition)transitions.get(i)).init(firstState, secondState);
   }
}
项目:trashjam2017    文件:SelectTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:trashjam2017    文件:VerticalSplitTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:trashjam2017    文件:BlobbyTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:trashjam2017    文件:HorizontalSplitTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:trashjam2017    文件:RotateTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:Progetto-C    文件:CombinedTransition.java   
public void init(GameState firstState, GameState secondState) {
   for (int i = transitions.size() - 1; i >= 0; i--) {
      ((Transition)transitions.get(i)).init(firstState, secondState);
   }
}
项目:Progetto-C    文件:SelectTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:Progetto-C    文件:VerticalSplitTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:Progetto-C    文件:BlobbyTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:Progetto-C    文件:HorizontalSplitTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:Progetto-C    文件:RotateTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:BaseClient    文件:CombinedTransition.java   
public void init(GameState firstState, GameState secondState) {
   for (int i = transitions.size() - 1; i >= 0; i--) {
      ((Transition)transitions.get(i)).init(firstState, secondState);
   }
}
项目:BaseClient    文件:SelectTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:BaseClient    文件:VerticalSplitTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:BaseClient    文件:BlobbyTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:BaseClient    文件:HorizontalSplitTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:BaseClient    文件:RotateTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:opsu    文件:EasedFadeOutTransition.java   
@Override
public void init(GameState firstState, GameState secondState) {}
项目:opsu    文件:DelayedFadeOutTransition.java   
@Override
public void init(GameState firstState, GameState secondState) {}
项目:GPVM    文件:CombinedTransition.java   
public void init(GameState firstState, GameState secondState) {
   for (int i = transitions.size() - 1; i >= 0; i--) {
      ((Transition)transitions.get(i)).init(firstState, secondState);
   }
}
项目:GPVM    文件:SelectTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:GPVM    文件:VerticalSplitTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:GPVM    文件:BlobbyTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:GPVM    文件:HorizontalSplitTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:GPVM    文件:RotateTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:GPVM    文件:CombinedTransition.java   
public void init(GameState firstState, GameState secondState) {
   for (int i = transitions.size() - 1; i >= 0; i--) {
      ((Transition)transitions.get(i)).init(firstState, secondState);
   }
}
项目:GPVM    文件:SelectTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:GPVM    文件:VerticalSplitTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}
项目:GPVM    文件:BlobbyTransition.java   
/**
 * @see org.newdawn.slick.state.transition.Transition#init(org.newdawn.slick.state.GameState, org.newdawn.slick.state.GameState)
 */
public void init(GameState firstState, GameState secondState) {
    prev = secondState;
}