Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import greenfoot.*;
- public class CFries extends CTrash
- {
- public CFries()
- {
- super(1);
- }
- public void ApplyOnFish(CFish fish)
- {
- //ak sa dotkne ryby
- fish.Accelerate(); // ryba zrychli
- fish.TurnOnEating(); // zamedzi sa moznost jedenia
- this.getWorld().removeObject(this); //zmizne jedlo
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement