diff options
author | Nao Pross <naopross@thearcway.org> | 2018-11-20 20:09:58 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-11-20 20:11:43 +0100 |
commit | f290fd64b6771e934f30c855d67cf5915f25f6f8 (patch) | |
tree | 0374e183b70913d1d1e6dcfa8f62a906120cb905 /src/subconscious/graphics/GameWindow.java | |
parent | Refractor game state change detection / locks (diff) | |
download | Subconscious-java-f290fd64b6771e934f30c855d67cf5915f25f6f8.tar.gz Subconscious-java-f290fd64b6771e934f30c855d67cf5915f25f6f8.zip |
Remove Scene.absoluteRender(), add Scene.build()
absoluteRender was a useless method since the normal render can be
extended by overriding and calling super.render()
Scene.build() is a new method which runs once when the scene thread
starts, and is meant to be used to initialize the scene.
Diffstat (limited to 'src/subconscious/graphics/GameWindow.java')
-rw-r--r-- | src/subconscious/graphics/GameWindow.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/subconscious/graphics/GameWindow.java b/src/subconscious/graphics/GameWindow.java index d7bb655..b0f48fd 100644 --- a/src/subconscious/graphics/GameWindow.java +++ b/src/subconscious/graphics/GameWindow.java @@ -116,15 +116,15 @@ public class GameWindow extends JFrame implements ActionListener { // build thread this.scene = scene; - this.sceneThread = new Thread(this.scene); - // for debugging - this.sceneThread.setName("Scene rendering Thread"); // add to UI this.root.add(this.scene, SCENE_CARD); ((CardLayout) this.root.getLayout()).show(this.root, SCENE_CARD); // start scene + this.sceneThread = new Thread(this.scene); + // for debugging + this.sceneThread.setName("Scene rendering Thread"); this.sceneThread.start(); this.scene.updateCanvasSize(this.getSize()); } |