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
but, after that i don't know what i have to write at loose class. could anyone help me? thanks
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 ); } |