/** Creates a new crate. */ public CrateView() { super(bluePrint, false); enableLazyTransformations(); if (Globals.normalMapping) { ShaderProvider.setShader("normals", this); } }
public CrateView(ClientObject obj) { super(obj, true); enableLazyTransformations(); if (Globals.normalMapping) { ShaderProvider.setShader("normals", this); } }
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); } }