home *** CD-ROM | disk | FTP | other *** search
/ Level 2000 August / Level_2000-08_cd1.bin / Demos / Vampire / Vampire_Demo.exe / Codex.nob / EffectDiscMask1000Faces.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  2.2 KB  |  59 lines

  1. public class EffectDiscMask1000Faces extends Codex {
  2.    private static final int TIMER_ID_MASK = 0;
  3.    private int _shifterGuid;
  4.    private int _maskGuid;
  5.  
  6.    void EffectEnded() {
  7.       CodexActor shifter = new CodexActor(this._shifterGuid);
  8.       shifter.ActorEndShapeShift();
  9.       ((CodexThing)shifter).SetShell("shellSprite_white", 20480, 0.0F, 2.0F, 1.0F, 1.0F);
  10.       ((CodexThing)shifter).SetAlpha(0.0F);
  11.       ((CodexThing)shifter).SetAlpha(1.0F, 2000.0F);
  12.       shifter.StopActorAction();
  13.       shifter.ClearActorFlags(4194304);
  14.    }
  15.  
  16.    public void restore(int flags) {
  17.       this._shifterGuid = CodexSequence.RestoreInt();
  18.       this._maskGuid = CodexSequence.RestoreInt();
  19.    }
  20.  
  21.    public void effectstarted(int actorGuid, int effectGuid, int creatorGuid, int duration) {
  22.       this._shifterGuid = actorGuid;
  23.       CodexActor shifter = new CodexActor(this._shifterGuid);
  24.       ((Codex)this).CaptureThing(this._shifterGuid);
  25.       this._maskGuid = shifter.GetActorEffectIntParam(effectGuid);
  26.       ((CodexThing)shifter).SetShell("shellSprite_white", 20480, 0.0F, 3.0F, 1.0F, 1.0F);
  27.       ((CodexThing)shifter).SetAlpha(0.0F, 1500.0F);
  28.       shifter.SetActorFlags(4194304);
  29.       ((Codex)this).SetTimer(1.0F, 0);
  30.    }
  31.  
  32.    public void killed(int guid, int causeID, int captureID) {
  33.       this.EffectEnded();
  34.    }
  35.  
  36.    public void save(int flags) {
  37.       CodexSequence.SaveInt(this._shifterGuid);
  38.       CodexSequence.SaveInt(this._maskGuid);
  39.    }
  40.  
  41.    public void timer(int timerID, float arg0, float arg1, float arg2, float arg3) {
  42.       switch (timerID) {
  43.          case 0:
  44.             CodexActor shifter = new CodexActor(this._shifterGuid);
  45.             ((CodexThing)shifter).SetShell("shellSprite_white", 20480, 0.0F, 2.0F, 1.0F, 1.0F);
  46.             CodexActor mask = new CodexActor(this._maskGuid);
  47.             shifter.ActorShapeShift(((CodexThing)mask).GetTemplateName(), 12);
  48.             ((CodexThing)shifter).SetAlpha(0.0F);
  49.             ((CodexThing)shifter).SetAlpha(1.0F, 2000.0F);
  50.             shifter.StopActorAction();
  51.          default:
  52.       }
  53.    }
  54.  
  55.    public void effectended(int actorGuid, int effectGuid, int creatorGuid, int reason) {
  56.       this.EffectEnded();
  57.    }
  58. }
  59.