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

2020/7/8

how to make gameover on the screen

1
2
3
danpost danpost

2020/7/16

#
dharasubham wrote...
To print game over screen, try this in the world: << Code Omitted >>
Line 16 will fail if the user is not logged in (as you cannot invoke a method on a null reference, i.e. getUserName on myInfo). Include "&& myInfo != null" on line 14.. Also, line 10 may also fail if storage is not available for any other reason other than the user not being logged in. Enclose the "UserInfo" lines of the method in:
if (UserInfo.isStorageAvailable())
{
    ...
}
You can add an "else" clause to show "non-UserInfo" game over.
ANIMALLOVER09824 ANIMALLOVER09824

2020/7/16

#
Just make your game over screen then add a new actor when you want it to be displayed
You need to login to post a reply.
1
2
3