Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import greenfoot.*;
- public class CApple extends CTrash
- {
- public CApple()
- {
- super(1);
- }
- public void ApplyOnFish(CFish fish)
- {
- //ak sa dotkne ryby
- fish.SetParalysisTimer(500); // ryba zamrzne na 500 tickov
- fish.SetMove(false); //pohyb bude false
- fish.TurnOnEating(); //zapne jedenie
- this.getWorld().removeObject(this); // zmizne jedlo
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement