home *** CD-ROM | disk | FTP | other *** search
- public class EffectDiscMask1000Faces extends Codex {
- private static final int TIMER_ID_MASK = 0;
- private int _shifterGuid;
- private int _maskGuid;
-
- void EffectEnded() {
- CodexActor shifter = new CodexActor(this._shifterGuid);
- shifter.ActorEndShapeShift();
- ((CodexThing)shifter).SetShell("shellSprite_white", 20480, 0.0F, 2.0F, 1.0F, 1.0F);
- ((CodexThing)shifter).SetAlpha(0.0F);
- ((CodexThing)shifter).SetAlpha(1.0F, 2000.0F);
- shifter.StopActorAction();
- shifter.ClearActorFlags(4194304);
- }
-
- public void restore(int flags) {
- this._shifterGuid = CodexSequence.RestoreInt();
- this._maskGuid = CodexSequence.RestoreInt();
- }
-
- public void effectstarted(int actorGuid, int effectGuid, int creatorGuid, int duration) {
- this._shifterGuid = actorGuid;
- CodexActor shifter = new CodexActor(this._shifterGuid);
- ((Codex)this).CaptureThing(this._shifterGuid);
- this._maskGuid = shifter.GetActorEffectIntParam(effectGuid);
- ((CodexThing)shifter).SetShell("shellSprite_white", 20480, 0.0F, 3.0F, 1.0F, 1.0F);
- ((CodexThing)shifter).SetAlpha(0.0F, 1500.0F);
- shifter.SetActorFlags(4194304);
- ((Codex)this).SetTimer(1.0F, 0);
- }
-
- public void killed(int guid, int causeID, int captureID) {
- this.EffectEnded();
- }
-
- public void save(int flags) {
- CodexSequence.SaveInt(this._shifterGuid);
- CodexSequence.SaveInt(this._maskGuid);
- }
-
- public void timer(int timerID, float arg0, float arg1, float arg2, float arg3) {
- switch (timerID) {
- case 0:
- CodexActor shifter = new CodexActor(this._shifterGuid);
- ((CodexThing)shifter).SetShell("shellSprite_white", 20480, 0.0F, 2.0F, 1.0F, 1.0F);
- CodexActor mask = new CodexActor(this._maskGuid);
- shifter.ActorShapeShift(((CodexThing)mask).GetTemplateName(), 12);
- ((CodexThing)shifter).SetAlpha(0.0F);
- ((CodexThing)shifter).SetAlpha(1.0F, 2000.0F);
- shifter.StopActorAction();
- default:
- }
- }
-
- public void effectended(int actorGuid, int effectGuid, int creatorGuid, int reason) {
- this.EffectEnded();
- }
- }
-