Examples of PhysicsFireable


Examples of edu.ups.gamedev.weapons.PhysicsFireable

      case NetworkConstants.TEAPOT:
        Teapot teapot = (Teapot) object;
        syncManager.register(object, new TeapotSynchronizeCreateMessage(teapot), rate);
        break;
      case NetworkConstants.PHYSICS_FIREABLE:
        PhysicsFireable pFire = (PhysicsFireable) object;
        // Possibly need to pass the actual class(MissleFireable, ect.) rather than it's parent class(Physics Fireable)
        syncManager.register(object, new PhysicsFireableSynchronizeCreateMessage(PhysicsFireable.class, pFire), rate);
        break;
      default:
        System.err.println("Attempt to register unknown type, quitting...");
View Full Code Here

Examples of edu.ups.gamedev.weapons.PhysicsFireable

      TankGame.GAME.unlock();
      return teapot;
    } else if (scm instanceof PhysicsFireableSynchronizeCreateMessage) {
      System.out.println("PhysicsFireableSyncMsg");
      PhysicsFireableSynchronizeCreateMessage msg = (PhysicsFireableSynchronizeCreateMessage) scm;
      PhysicsFireable pFire = msg.getFireable();
     
      TankGame.GAME.lock();
      TankGame.GAMESTATE.getRoot().attachChild(pFire);
      TankGame.GAMESTATE.getRoot().updateGeometricState(0, true);
      pFire.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
      TankGame.GAMESTATE.getRoot().updateRenderState();
      TankGame.GAME.unlock();
      return pFire;
    }
    System.exit(1); //if we get here, it's an error, quit the program
View Full Code Here

Examples of edu.ups.gamedev.weapons.PhysicsFireable

    angularDragCoefficient = pFire.getAngularDragCoefficient();
    angularDragArea = pFire.getAngularDragArea();
  }

  public PhysicsFireable getFireable() {
    PhysicsFireable pFire = null;
    try {
      pFire = (PhysicsFireable) fireableClass.newInstance();
      pFire.setWarhead(warhead);
    } catch (InstantiationException ie) {
      ie.printStackTrace();
    } catch (IllegalAccessException iae) {
      iae.printStackTrace();
    }

    pFire.setLocalTranslation(translation);
    pFire.setLocalRotation(rotation);
   
    pFire.setStabilizationForce(stabilizationForce);
    pFire.setStabilizationSpeed(stabilizationSpeed);
    pFire.setLinearDragCoefficient(linearDragCoefficient);
    pFire.setLinearDragArea(linearDragArea);
    pFire.setAngularDragCoefficient(angularDragCoefficient);
    pFire.setAngularDragArea(angularDragArea);
    return pFire;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.