mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-29 08:26:37 +01:00
Instance init
- So that simi can have his cogs. - Inheritance is painful when models are acquired in an instance's ctor
This commit is contained in:
parent
fe62302d25
commit
af98782a89
2 changed files with 8 additions and 0 deletions
|
@ -29,6 +29,13 @@ public abstract class AbstractInstance implements IInstance, ILightUpdateListene
|
||||||
this.world = world;
|
this.world = world;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize models here.
|
||||||
|
*/
|
||||||
|
public void init() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free any acquired resources.
|
* Free any acquired resources.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -286,6 +286,7 @@ public abstract class InstanceManager<T> implements MaterialManagerImpl.OriginSh
|
||||||
AbstractInstance renderer = createRaw(obj);
|
AbstractInstance renderer = createRaw(obj);
|
||||||
|
|
||||||
if (renderer != null) {
|
if (renderer != null) {
|
||||||
|
renderer.init();
|
||||||
renderer.updateLight();
|
renderer.updateLight();
|
||||||
LightUpdater.get(renderer.world)
|
LightUpdater.get(renderer.world)
|
||||||
.addListener(renderer);
|
.addListener(renderer);
|
||||||
|
|
Loading…
Reference in a new issue