mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-27 23:47:09 +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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize models here.
|
||||
*/
|
||||
public void init() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Free any acquired resources.
|
||||
*/
|
||||
|
|
|
@ -286,6 +286,7 @@ public abstract class InstanceManager<T> implements MaterialManagerImpl.OriginSh
|
|||
AbstractInstance renderer = createRaw(obj);
|
||||
|
||||
if (renderer != null) {
|
||||
renderer.init();
|
||||
renderer.updateLight();
|
||||
LightUpdater.get(renderer.world)
|
||||
.addListener(renderer);
|
||||
|
|
Loading…
Reference in a new issue