daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Sep 19th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package space.jets;
  2.  
  3. import org.newdawn.slick.*;
  4. import org.newdawn.slick.state.*;
  5.  
  6. class stateGame extends BasicGameState{
  7.    
  8.     private static Image background;
  9.     private static Image salamenceFlyPos1;
  10.     private static Image salamenceFlyPos2;
  11.     private static Image salamenceFlyPos3;
  12.     private static Image currentSalamenceState;
  13.     private static int salamenceStateTimer;
  14.     public static boolean salamenceImageShifterRunning = true;
  15.     public static Thread salamenceImageShifterT = new Thread();
  16.  
  17.     public Image getFlyPos1(){
  18.         return salamenceFlyPos1;
  19.     }
  20.    
  21.     public Image getFlyPos2(){
  22.         return salamenceFlyPos2;
  23.     }
  24.    
  25.     public Image getFlyPos3(){
  26.         return salamenceFlyPos3;
  27.     }
  28.    
  29.     public Image getCurrentFly(){
  30.         return currentSalamenceState;
  31.     }
  32.    
  33.     public void setCurrentFly(Image flyState){
  34.         currentSalamenceState = flyState;
  35.     }
  36.    
  37.     public boolean getSalamenceImageShifter(){
  38.         return salamenceImageShifterRunning;
  39.     }
  40.    
  41.     public void setSalamenceImageShifter(){
  42.         if(salamenceImageShifterRunning == true){
  43.             salamenceImageShifterRunning = false;
  44.         }else{
  45.             salamenceImageShifterRunning = true;
  46.         }
  47.     }
  48.    
  49.     stateGame(int stateGame) {
  50.        
  51.     }
  52.  
  53.     @Override
  54.     public int getID() {
  55.         return 1;
  56.     }
  57.  
  58.     @Override
  59.     public void init(GameContainer gc, StateBasedGame sbg) throws SlickException {
  60.         background = new Image("NintendoBackground.jpg");
  61.         salamenceFlyPos1 = new Image("SalamenceFlying1.png");
  62.         salamenceFlyPos2 = new Image("SalamenceFlying2.png");
  63.         salamenceFlyPos3 = new Image("SalamenceFlying3.png");
  64.         currentSalamenceState = salamenceFlyPos1;
  65.         salamenceStateTimer = 0;
  66.         salamenceImageShifterT.start();
  67.     }
  68.  
  69.     @Override
  70.     public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException {
  71.         g.drawImage(background, 1, 1);
  72.         g.drawImage(currentSalamenceState, 200, 200);
  73.     }
  74.  
  75.     @Override
  76.     public void update(GameContainer gc, StateBasedGame sbg, int i) throws SlickException {
  77.        
  78.     }
  79.    
  80. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top