summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/MoveCameraAction.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/scape/MoveCameraAction.java')
-rw-r--r--NET/worlds/scape/MoveCameraAction.java127
1 files changed, 127 insertions, 0 deletions
diff --git a/NET/worlds/scape/MoveCameraAction.java b/NET/worlds/scape/MoveCameraAction.java
new file mode 100644
index 0000000..c6a6391
--- /dev/null
+++ b/NET/worlds/scape/MoveCameraAction.java
@@ -0,0 +1,127 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import NET.worlds.core.Std;
+/* */ import java.io.PrintStream;
+/* */ import java.util.Enumeration;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class MoveCameraAction
+/* */ extends MoveAction
+/* */ {
+/* */ public Persister trigger(Event e, Persister seqID)
+/* */ {
+/* 29 */ Pilot pl = Pilot.getActive();
+/* 30 */ if ((pl instanceof HoloPilot))
+/* */ {
+/* 32 */ HoloPilot holo = (HoloPilot)pl;
+/* 33 */ holo.releaseCamera();
+/* */
+/* 35 */ Object owner = holo.getCamera();
+/* */
+/* 37 */ if ((owner == null) || (!(owner instanceof WObject)))
+/* 38 */ return null;
+/* 39 */ WObject o = (WObject)owner;
+/* */
+/* 41 */ if (this.killed)
+/* */ {
+/* 43 */ this.killed = false;
+/* 44 */ this.activeID = null;
+/* 45 */ holo.reclaimCamera();
+/* 46 */ return null;
+/* */ }
+/* */
+/* */
+/* 50 */ if (seqID == null)
+/* */ {
+/* */
+/* 53 */ if (this.activeID != null) {
+/* 54 */ return this.activeID;
+/* */ }
+/* 56 */ if (this.killOthers)
+/* */ {
+/* 58 */ Enumeration<Action> acts = o.getActions();
+/* 59 */ while (acts.hasMoreElements()) {
+/* 60 */ Action a = (Action)acts.nextElement();
+/* 61 */ if ((a != this) && ((a instanceof MoveAction))) {
+/* 62 */ MoveAction ma = (MoveAction)a;
+/* 63 */ if (ma.isRunning())
+/* */ {
+/* 65 */ ma.kill();
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */
+/* 72 */ this.startTime = Std.getRealTime();
+/* 73 */ this.activeID = new SuperRoot();
+/* 74 */ seqID = this.activeID;
+/* */ }
+/* */
+/* */
+/* 78 */ if (seqID != this.activeID) {
+/* 79 */ return null;
+/* */ }
+/* */
+/* 82 */ int currentTime = Std.getRealTime();
+/* 83 */ int cycleNo = (currentTime - this.startTime) / this.cycleTime;
+/* */
+/* 85 */ float frameLoc = 1.0F;
+/* 86 */ if ((cycleNo >= this.cycles) && (!this.loopInfinite))
+/* */ {
+/* 88 */ System.out.println("Killing MoveCameraAction. loopInfinite = " + this.loopInfinite);
+/* 89 */ this.activeID = null;
+/* */ }
+/* */ else {
+/* 92 */ frameLoc = (currentTime - this.startTime) % this.cycleTime /
+/* 93 */ this.cycleTime;
+/* */ }
+/* 95 */ o.makeIdentity();
+/* */
+/* */
+/* */
+/* 99 */ o.spin(this.extentSpin, this.extentRotation * frameLoc);
+/* 100 */ o.spin(this.startSpin, this.startRotation);
+/* */
+/* 102 */ Point3Temp p = Point3Temp.make(
+/* 103 */ (float)Math.pow(this.extentScale.x, frameLoc),
+/* 104 */ (float)Math.pow(this.extentScale.y, frameLoc),
+/* 105 */ (float)Math.pow(this.extentScale.z, frameLoc));
+/* 106 */ o.scale(p.times(this.startScale));
+/* 107 */ o.moveTo(Point3Temp.make(this.extentPoint)
+/* 108 */ .times(frameLoc)
+/* 109 */ .plus(this.startPoint));
+/* */
+/* */
+/* 112 */ if (this.activeID == null)
+/* 113 */ holo.reclaimCamera();
+/* 114 */ return this.activeID;
+/* */ }
+/* */
+/* */
+/* */
+/* 119 */ return null;
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MoveCameraAction.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file