From 708431bf86a55d0b0f9abedfafc8c60440fa2f8f Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Fri, 25 Feb 2005 00:59:35 +0000 Subject: [PATCH] Allow the SceneFactory to be set after construction. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3368 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/whirled/client/SceneDirector.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/whirled/client/SceneDirector.java b/src/java/com/threerings/whirled/client/SceneDirector.java index ac02604fa..27a58a0ad 100644 --- a/src/java/com/threerings/whirled/client/SceneDirector.java +++ b/src/java/com/threerings/whirled/client/SceneDirector.java @@ -67,7 +67,10 @@ public class SceneDirector extends BasicDirector * @param locdir the location director in use on the client, with * which the scene director will coordinate when changing location. * @param screp the entity from which the scene director will load - * scene data from the local client scene storage. + * scene data from the local client scene storage. This may be null + * when the SceneDirector is constructed, but it should be + * supplied via {@link #setSceneRepository} prior to really using + * this director. * @param fact the factory that knows which derivation of {@link * Scene} to create for the current system. */ @@ -79,7 +82,7 @@ public class SceneDirector extends BasicDirector // we'll need these for later _ctx = ctx; _locdir = locdir; - _screp = screp; + setSceneRepository(screp); _fact = fact; // set ourselves up as a failure handler with the location @@ -91,6 +94,14 @@ public class SceneDirector extends BasicDirector new SceneDecoder(this)); } + /** + * Set the scene repository. + */ + public void setSceneRepository (SceneRepository screp) + { + _screp = screp; + } + /** * Returns the display scene object associated with the scene we * currently occupy or null if we currently occupy no scene.