Back to project page LucyTheMoocher.
The source code is released under:
MIT License
If you think the Android project LucyTheMoocher listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.lucythemoocher.loops; // w w w. j ava 2s .com import android.graphics.Color; import com.lucythemoocher.Globals.Globals; public class GameOverLoop extends Loop { private float currMs_; /** * Show "lives" lives for "msToLive" ms and then change to "next" loop * @param lives * @param msToLive * @param next */ public GameOverLoop(float msToLive) { super(); currMs_ = msToLive; Globals.getInstance().getGame().stop(); } @Override public void update() { currMs_ -= Globals.getInstance().getTimer().getDt(); if (currMs_ <= 0) { changeCurrentLoop(new InitMenuLoop()); } } @Override public void render() { Globals.getInstance().getCamera().drawFullColor(0xFF00FFCC); Globals.getInstance().getCamera().drawCenterText("GAME OVER...", Color.WHITE); drawn_ = true; } @Override public boolean doRender() { return !drawn_; } }