From f290fd64b6771e934f30c855d67cf5915f25f6f8 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Tue, 20 Nov 2018 20:09:58 +0100 Subject: 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. --- src/subconscious/graphics/GameWindow.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/subconscious/graphics/GameWindow.java') 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()); } -- cgit v1.2.1