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

  1. public class RotateAlways extends Codex {
  2.    private CodexThing _mover;
  3.    private int _frameNum = 1;
  4.    private float _duration = 3.0F;
  5.    private int _delay;
  6.    public static String[] _params = new String[]{"Rotate around frame;1", "Duration;3.0", "Delay; 0"};
  7.  
  8.    public RotateAlways(int frameNum, float duration, int delay) {
  9.       this._frameNum = frameNum;
  10.       this._duration = duration;
  11.       this._delay = delay;
  12.    }
  13.  
  14.    public void beginscene(int clientGuid, int captureID) {
  15.       this._mover = new CodexThing(((Codex)this).GetClassThing());
  16.       this._mover.RotatePivot(this._frameNum, this._duration);
  17.    }
  18.  
  19.    public void arrived(int thingGuid, int frameNum, int captureId) {
  20.       ((Codex)this).SetTimer((float)this._delay);
  21.    }
  22.  
  23.    public void timer(int timerID, float arg0, float arg1, float arg2, float arg3) {
  24.       this._mover.RotatePivot(this._frameNum, this._duration);
  25.    }
  26. }
  27.