Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1.  
  2. public class KingTux extends Creature
  3. {
  4. /**
  5. * Constructor for objects of class KingTux
  6. */
  7. public KingTux(double x, double y, double z)
  8. {
  9. super(x, y, z);
  10.  
  11. // Must use the mutator as the fields have private access
  12. // in the parent class
  13. setTexture("models/tux/tux.png");
  14. setModel("models/tux/tux.obj");
  15. setScale(3);
  16. setRotateY(180);
  17. }
  18.  
  19. public void check()
  20. {
  21. if (getX() > 59) {
  22. setX(59);
  23. } else if (getX() < 10) {
  24. setX(10);
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement