Allow custom BodyLocators to be provided to different PlaceManagers. Twisty
maze of passages! git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5655 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -192,7 +192,7 @@ public class PlaceRegistry
|
|||||||
}
|
}
|
||||||
|
|
||||||
// let the pmgr know about us and its configuration
|
// let the pmgr know about us and its configuration
|
||||||
pmgr.init(this, _invmgr, _omgr, _locator, config);
|
pmgr.init(this, _invmgr, _omgr, selectLocator(config), config);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warning(e);
|
log.warning(e);
|
||||||
@@ -242,6 +242,14 @@ public class PlaceRegistry
|
|||||||
return _injector.getInstance(clazz);
|
return _injector.getInstance(clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selects the body locator to be used by the PlaceManager created for the supplied config.
|
||||||
|
*/
|
||||||
|
protected BodyLocator selectLocator (PlaceConfig config)
|
||||||
|
{
|
||||||
|
return _locator;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by the place manager when it has been shut down.
|
* Called by the place manager when it has been shut down.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user