Ejemplo n.º 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);
    }
  }
Ejemplo n.º 2
0
 public void removeFromWorld(World world) {
   super.removeFromWorld(world);
   world.removeObject(shield);
 }
Ejemplo n.º 3
0
 public void addToWorld(World world) {
   super.addToWorld(world);
   world.addObject(shield);
 }