示例#1
0
  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);
    }
  }
示例#2
0
 public void removeFromWorld(World world) {
   super.removeFromWorld(world);
   world.removeObject(shield);
 }
示例#3
0
 public void addToWorld(World world) {
   super.addToWorld(world);
   world.addObject(shield);
 }