/* */ 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 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 */