Advertisement
Filipinex

CFries

Mar 19th, 2024
528
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. import greenfoot.*;  
  2.  
  3. public class CFries extends CTrash
  4. {
  5.     public CFries()
  6.     {
  7.         super(1);
  8.     }
  9.    
  10.     public void ApplyOnFish(CFish fish)
  11.     {
  12.         //ak sa dotkne ryby
  13.         fish.Accelerate(); // ryba zrychli
  14.         fish.TurnOnEating(); // zamedzi sa moznost jedenia
  15.         this.getWorld().removeObject(this); //zmizne jedlo
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement