1 PackageCom.barry;2 3 ImportJava.awt.Color;4 Importjava.beans.IntrospectionException;5 Importjava.lang.annotation.Repeatable;6 7 ImportCom.rupeng.game.GameCore;//Import the game engine pack8 9 Ten //implementing the Runnable interface One Public classGame_rupengImplementsRunnable { A - Public Static voidMain (string[] args) { -Gamecore.start (NewGame_rupeng ());//build the Game object and let the engine start it the } - PrivateObject timg; - //override the Run () method in the interface to control the game - @Override + Public voidrun () { -Gamecore.setgamesize (1024, 640);//set the game window size +Gamecore.setgametitle ("Mavench's game production");//set the title of the game window A //Gamecore.pause (+);//set the game window to stay for 1 seconds atGamecore.alert ("Listen to music is a good one-Aska"); -Gamecore.loadbgview ("Timg.jpg"); -Gamecore.playsound ("Good one-Aska -1774946504.mp3",true); -Gamecore.pause (15000);//set the game window to stay for 15 seconds -Gamecore.loadbgview ("Aa.jpg"); -Gamecore.pause (3000);//set the game window to stay for 3 seconds inGamecore.alert ("Listen to music Try everything"); -Gamecore.playsound ("trigo! -Try Everything.mp3 ",true); toGamecore.pause (20000); + Booleanb = Gamecore.confirm ("Do you think it's nice?") "); - if(b) theGamecore.alert ("Your answer is nice"); * Else $Gamecore.alert ("You answer is not good to hear");Panax Notoginseng -String N1 = Gamecore.input (NULL, "Please enter a number"); theString N2 = Gamecore.input (NULL, "Please enter a number again"); + A if(N1.length () <=0| | N2.length () <=0) { theGamecore.alert ("Incorrect input, exiting soon"); +Gamecore.pause (3000); - $}Else { $Gamecore.alert ("Two digits" and is: "+ (Integer.parseint (N1) +Integer.parseint (n2)); - } -Gamecore.createtext (0, "Mavench"); theGamecore.createtext (1, "No Pains no GAINS"); -Gamecore.settextposition (0, 100, 100);WuyiGamecore.settextposition (1, 100, 200); theGamecore.settextcolor (0, Color.Blue); -Gamecore.settextcolor (1,NewColor (255,3,3)); WuGamecore.settextfontsize (0, 30); -Gamecore.settextfontsize (1, 18); About if(Gamecore.confirm ("Do you want to hide the text label?") ")) { $Gamecore.hidetext (0); -Gamecore.hideimage (1); -}Else { -System.exit (0); A } +Gamecore.alert ("Take a picture"); theGamecore.createimage (0, "beauty. jpg"); -Gamecore.setimageposition (2,400,200); $ theGamecore.createimage (1); theGamecore.setimageposition (4, 500, 500); the theGamecore.alert ("Show Out")); -Gamecore.setimagesource (1, "Wolf 2.jpg"); inGamecore.pause (100000); the the } About the the}
Simple Java Interface display