diff options
author | Nao Pross <naopross@thearcway.org> | 2018-11-24 18:44:45 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-11-24 18:44:45 +0100 |
commit | 5724f1dc25787e82fd25c3c208896f22fdeffa58 (patch) | |
tree | 840db9d1b9516e9a160afeaaad94c7814051728c /src | |
parent | Add RenderingHints and minor performance improvements (diff) | |
download | Subconscious-java-5724f1dc25787e82fd25c3c208896f22fdeffa58.tar.gz Subconscious-java-5724f1dc25787e82fd25c3c208896f22fdeffa58.zip |
Call Game.update() on Scene loop
Diffstat (limited to 'src')
-rw-r--r-- | src/subconscious/Game.java | 8 | ||||
-rw-r--r-- | src/subconscious/graphics/Scene.java | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/subconscious/Game.java b/src/subconscious/Game.java index 5c3d7d0..6f14def 100644 --- a/src/subconscious/Game.java +++ b/src/subconscious/Game.java @@ -56,7 +56,13 @@ public class Game { this.setState(State.BATTLE); } - public void update() { + public void update(long deltaNanoTime) { + // TODO: debug, disable on "release" + // System.out.println("Game update from : " + // + Thread.currentThread().getStackTrace()[2].getClassName() + " " + // + Thread.currentThread().getStackTrace()[2].getMethodName() + " " + // + Thread.currentThread().getStackTrace()[2].getFileName() + " " + // ); } diff --git a/src/subconscious/graphics/Scene.java b/src/subconscious/graphics/Scene.java index 113a46f..7e67490 100644 --- a/src/subconscious/graphics/Scene.java +++ b/src/subconscious/graphics/Scene.java @@ -209,6 +209,7 @@ public abstract class Scene extends Panel // TODO: change to this.game.update(...) this.update(currentUpdateTime - lastUpdateTime); + this.game.update(currentUpdateTime - lastUpdateTime); endLoopTime = System.nanoTime(); deltaLoop = endLoopTime - beginLoopTime; |