Advertisement
Guest User

Casual.java

a guest
Sep 6th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. package com.polonez11212;
  2.  
  3. import javax.swing.*;
  4. import java.awt.*;
  5.  
  6. public class Casual {
  7. //tutaj bedzie Layout Slajdow po Starcie
  8.  
  9. Slides slides;
  10. Music music = new Music();
  11. Start start;
  12.  
  13. PlayerVariables pv = new PlayerVariables();
  14.  
  15. Casual(Slides slides){
  16. this.slides=slides;
  17. this.start=slides.start;
  18. System.out.println("Works");
  19. }
  20.  
  21.  
  22.  
  23. public void firstDay(){
  24. pv.movingHandlerON=true;
  25. start.addKeyListener(new MovingChoiceHandler(slides)); // naprawic !
  26. music.setMusic(pv.musicDay);
  27. music.loopMusic(99);
  28. music.startMusic();
  29. slides.textPanel.setText("You had the accident in forrest.\nYou take all u got and go into adventure.\n\nWhere do You want to go?\n\n[Q] Go forest Pathway [Z] Go Muddy road");
  30.  
  31. }
  32.  
  33. // po wypiciu wody i zdjedzeniu lub wyrzuceniu mamy opcje isc albo zostac i zregenerowac hp o 5hp. ale bedziemy spragnieni np o 10unitow.
  34.  
  35. public void waterFound(){slides.textPanel.setText("You found Water.\nWhat do You want to do?\n\n[R]- Eat [T] Throw away");}
  36.  
  37. public void foodFound(){slides.textPanel.setText("You found Food.\nWhat do You want to do?\n\n[R]- Eat [T] Throw away");}
  38.  
  39. public void weaponFound(){slides.textPanel.setText("You found Weapon.\nWhat do You want to do?\n\n[R]- Take it [T] Throw away");}
  40.  
  41. public void waterWasDrunk(){
  42. slides.textPanel.setText("You have drink the water\nThis action restored You 15 Units.\nWhere do You want to go?\n\n[W] Ahead, [S]go Back, [A] Left, [D] Right");
  43. }
  44. public void foodWasEaten(){
  45. slides.textPanel.setText("You have eat your food.\nThis action restored You 10HP and 5Units.\nWhere do You want to go?\n\n[W] Ahead, [S]go Back, [A] Left, [D] Right");
  46. }
  47. public void itemBeenThrowed(){
  48. slides.textPanel.setText("You have throwed Your item.\nWhere do You want to go?\n\n[W] Ahead, [S]go Back, [A] Left, [D] Right");
  49. }
  50. }
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement