started implementing buttons

master
Marcus Gosselin 2016-03-11 00:10:51 -05:00
parent 4b799bbfea
commit 03a9467bc9
2 changed files with 22 additions and 0 deletions

View File

@ -10,3 +10,19 @@ $width = 1024i
$height = 600i
$color = #F0F0F0
End Component
[Entity]
$name = "Menu Manager"
#this is the object that the buttons will use to take in the events.
Component spacewars.MenuManager
End Component
Component ui.Button
$eventClass = "spacewars.MenuManager"
$eventName = "playClick"
$name = "play button"
$text = "Play"
$x = 900i;
$y = 500i;
End Component

View File

@ -1,9 +1,15 @@
package spacewars;
import diveengine2d.DiveScript;
import diveengine2d.SceneManager;
/**
* Created by Marcus on 3/10/2016.
*/
public class MenuManager extends DiveScript {
public void playClicked() {
SceneManager.loadScene("game");
}
}