Back to project page gameengine.
The source code is released under:
Apache License
If you think the Android project gameengine 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.garrapeta.gameengine; //from w ww .j a va2 s . c o m public abstract class GameMessage { protected int mPriority; protected static final int MESSAGE_PRIORITY_DEFAULT = 0; protected static final int MESSAGE_PRIORITY_MAX = Integer.MIN_VALUE; private float mDelay; public GameMessage() { super(); mDelay = 0; } public abstract void onPosted(GameWorld world); public final boolean isReadyToBeDispatched(float lastFrameLength) { if (mDelay > 0) { mDelay -= lastFrameLength; } return mDelay <= 0; } public abstract void doInGameLoop(GameWorld world); protected final int getPriority() { return mPriority; } void setDelay(float delay) { mDelay = delay; } }