private void checkChild() { if (world == null) { throw new RuntimeException("The CrateView instance has to know its world!"); } if (animIndex == 0 && child == null && !botUsage) { // Create the child object with the animation inside. addChild(childBluePrint); if (Globals.compiledObjects) { child.compile(true); } String name = "phong"; if (Globals.normalMapping) { name = "normals"; } ShaderProvider.setShader(name, child); world.addObject(child); } }
public void addToWorld(World world) { super.addToWorld(world); world.addObject(shield); }