| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- var game = Atomic.game;
- var view = game.uiView;
- var UI = Atomic.UI;
- var UIButton = Atomic.UIButton;
- var UITextField = Atomic.UITextField;
- var UILayout = Atomic.UILayout;
- var layout = new Atomic.UIWidget();
- layout.load("UI/Hud.ui.txt");
- layout.setSize(game.graphics.width, game.graphics.height);
- view.addChild(layout);
- SpaceGame.viewport.rect = layout.getWidget("viewport").rect;
- self.cleanup = function() {
- view.removeChild(layout);
- }
- var scoretext = layout.getWidget("scoretext");
- //UI.debugShowSettingsWindow(view);
- self.updateScore = function (value) {
- scoretext.text = "Score: " + value;
- }
- self.updateHealth = function (value) {
- //healthText.text = "Health: " + value;
- }
- self.updateGameText = function (text) {
- //gameText.text = text;
- }
- function start() {
- }
- function update(timeStep) {
- }
|