List of usage examples for com.badlogic.gdx.utils Timer Timer
public Timer()
From source file:com.kotcrab.vis.editor.module.editor.StatusBarModule.java
License:Apache License
public StatusBarModule() { timer = new Timer(); statusLabel = new VisLabel(""); infoLabel = new VisLabel(""); table = new VisTable(); table.setBackground(VisUI.getSkin().getDrawable("button")); table.add(statusLabel);/*from ww w .jav a 2 s . co m*/ table.add().expand().fill(); table.add(infoLabel); }
From source file:org.oscim.layers.tile.TileLoader.java
License:Open Source License
public TileLoader(TileManager tileManager) { if (mTimer == null) mTimer = new Timer(); mTileManager = tileManager; }
From source file:com.bagon.matchteam.mtx.game.AbstractGameManager.java
License:Apache License
public AbstractGameManager(Stage stage, AbstractScreen screen) { this.stage = stage; this.screen = screen; random = new Random(); timer = new Timer(); }
From source file:com.torrosoft.triviazo.screens.VindicetisExSimius.java
License:Open Source License
public VindicetisExSimius(final TriviazoGame game) { super(game);//from w ww . j a v a2s . c o m game.getMusicManager().play(TriviazoMusic.TENSION_IS_RISING); timer = new Timer(); timer.scheduleTask(task, 0F, intervalSeconds); timer.start(); }
From source file:com.torrosoft.triviazo.screens.TempusFugit.java
License:Open Source License
public TempusFugit(final TriviazoGame game) { super(game);// w ww . j a va 2 s.c o m game.getMusicManager().play(TriviazoMusic.TENSION_IS_RISING); timer = new Timer(); timer.scheduleTask(task, delaySeconds, intervalSeconds); timer.start(); }
From source file:com.strategames.engine.scenes.scene2d.ui.EventHandler.java
License:Open Source License
public EventHandler(Actor actor) { this.timer = new Timer(); this.actor = actor; }
From source file:be.ac.ucl.lfsab1509.bouboule.game.timer.TimerMgr.java
License:Open Source License
/** * Create a new timer which should be launch with {@link #play()}. *///from w w w . jav a 2s . c om public void createNewTimer(final int iRemainingTime) { if (timer != null) { // stop the previous timer this.stop(); } fireNewRemainingTime(iRemainingTime); Timer.Task task = new Timer.Task() { @Override public void run() { fireRun(); } }; timer = new Timer(); timer.scheduleTask(task, iDelay, iInterval); // first time, time between timer.stop(); // do not launch it immediately }
From source file:com.gmail.bleedobsidian.logicbuilder.screens.loading.LoadingScreen.java
License:Open Source License
/** * Update.//from w ww . jav a2 s .c o m * * @param fullScreenCamera Full Screen OrthographicCamera. * @param delta Delta Value. */ public void update(OrthographicCamera fullScreenCamera, float delta) { if (LogicBuilder.getInstance().getResourceManager().update()) { new Timer().scheduleTask(new Task() { @Override public void run() { LogicBuilder.getInstance().finishedLoading(); } }, 5); } }
From source file:com.sawan.mathattack.game.AbstractGameManager.java
License:Open Source License
/** * Instantiates a new abstract game manager. * * @param stage the stage// w ww .ja v a 2 s. c om * @param screen the screen */ public AbstractGameManager(Stage stage, AbstractScreen screen) { this.stage = stage; this.screen = screen; random = new Random(); timer = new Timer(); }
From source file:com.ore.infinium.ChatBox.java
License:Open Source License
public ChatBox(OreClient client, Stage stage, Skin skin) { m_client = client;// w ww . java2 s.c o m m_stage = stage; m_skin = skin; m_notificationTimer = new Timer(); container = new Table(); stage.addActor(container); container.bottom().left().padBottom(5).setSize(600, 300); m_scrollPaneTable = new Table(); m_scroll = new ScrollPane(m_scrollPaneTable); container.add(m_scroll).expand().fill().colspan(4); container.row().space(2); m_messageField = new TextField("", m_skin); container.add(m_messageField).expandX().fill(); m_send = new TextButton("send", m_skin); m_send.addListener(new ChangeListener() { public void changed(ChangeListener.ChangeEvent event, Actor actor) { sendChat(); } }); container.add(m_send).right(); stage.setKeyboardFocus(m_send); // container.background("default-window"); container.layout(); m_scrollPaneTable.layout(); m_scroll.layout(); m_scroll.setScrollPercentY(100f); stage.addListener(new InputListener() { @Override //fixme override mouse as well, to ignroe those. public boolean keyDown(InputEvent event, int keycode) { if (keycode == Input.Keys.ENTER) { if (chatVisibilityState == ChatVisibility.Normal) { closeChatDialog(); sendChat(); } else { openChatDialog(); } return true; } if (keycode == Input.Keys.ESCAPE) { closeChatDialog(); return false; } //ignore all keys if we're in non-focused mode if (chatVisibilityState != ChatVisibility.Normal) { return false; } return super.keyDown(event, keycode); } }); closeChatDialog(); closeChatDialog(); closeChatDialog(); // showForNotification(); }