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
This commit is contained in:
@@ -67,7 +67,10 @@ public class SceneDirector extends BasicDirector
|
|||||||
* @param locdir the location director in use on the client, with
|
* @param locdir the location director in use on the client, with
|
||||||
* which the scene director will coordinate when changing location.
|
* which the scene director will coordinate when changing location.
|
||||||
* @param screp the entity from which the scene director will load
|
* @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
|
* @param fact the factory that knows which derivation of {@link
|
||||||
* Scene} to create for the current system.
|
* Scene} to create for the current system.
|
||||||
*/
|
*/
|
||||||
@@ -79,7 +82,7 @@ public class SceneDirector extends BasicDirector
|
|||||||
// we'll need these for later
|
// we'll need these for later
|
||||||
_ctx = ctx;
|
_ctx = ctx;
|
||||||
_locdir = locdir;
|
_locdir = locdir;
|
||||||
_screp = screp;
|
setSceneRepository(screp);
|
||||||
_fact = fact;
|
_fact = fact;
|
||||||
|
|
||||||
// set ourselves up as a failure handler with the location
|
// set ourselves up as a failure handler with the location
|
||||||
@@ -91,6 +94,14 @@ public class SceneDirector extends BasicDirector
|
|||||||
new SceneDecoder(this));
|
new SceneDecoder(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the scene repository.
|
||||||
|
*/
|
||||||
|
public void setSceneRepository (SceneRepository screp)
|
||||||
|
{
|
||||||
|
_screp = screp;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the display scene object associated with the scene we
|
* Returns the display scene object associated with the scene we
|
||||||
* currently occupy or null if we currently occupy no scene.
|
* currently occupy or null if we currently occupy no scene.
|
||||||
|
|||||||
Reference in New Issue
Block a user