Beispiel #1
0
 public static void serverCmdCycleCameraFlyType(GameConnection client)
 {
     Extendable.Camera camera = client["camera"];
     if (camera.getMode() != TypeCameraMotionMode.Fly)
     {
         return;
     }
     if (camera["newtonMode"].AsBool() == false)
     {
         camera["newtonMode"]     = true.AsString();
         camera["newtonRotation"] = false.AsString();
         camera.setVelocity(new Point3F("0 0 0"));
     }
     else if (camera["newtonRotation"].AsBool() == false)
     {
         camera["newtonMode"]     = true.AsString();
         camera["newtonRotation"] = true.AsString();
         camera.setAngularVelocity(new Point3F("0 0 0"));
     }
     else
     {
         camera["newtonMode"]     = false.AsString();
         camera["newtonRotation"] = false.AsString();
     }
     client.setControlObject(camera);
     syncEditorGui();
 }
Beispiel #2
0
 public static void serverCmdSetEditorCameraNewton(GameConnection client)
 {
     Extendable.Camera camera = client["camera"];
     camera.setFlyMode();
     camera["newtonMode"]     = true.AsString();
     camera["newtonRotation"] = false.AsString();
     camera.setVelocity(new Point3F("0 0 0"));
     client.setControlObject(camera);
 }