blob: c6a6391e3b39e8a7a10f57ed4f694056eb8295e7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
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
*/
|