This site requires JavaScript, please enable it in your browser!
Greenfoot back
gudgurl123
gudgurl123 wrote ...

2017/12/9

How to make actor appear to world

gudgurl123 gudgurl123

2017/12/9

#
hi, i try to make "game over" for my game. i already make actor game over that have subclass loose. i wrote this code to my world
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
public void addLive (int points)
   {
       Live --;
       showLive();
       if (Live < 1)
       {
           Greenfoot.playSound("game-over.wav");
          addObject(new loose(), 110, 350);
          Greenfoot.stop();
       }
   }
    
   private void showLive()
   {
       showText("Live: " + Live, 200,12);
   }
but, after that i don't know what i have to write at loose class. could anyone help me? thanks
danpost danpost

2017/12/9

#
What do you have so far for the game over and loose class codes?
You need to login to post a reply.