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

  1. public class Weather extends Codex {
  2.    public CodexThing weatherThing = new CodexThing(((Codex)this).GetClassThing());
  3.    public CodexThing weatherEffect;
  4.    public int weatherEffectGUID;
  5.    public String weatherEffectName;
  6.  
  7.    public void beginscene(int clientGuid, int captureID) {
  8.       this.ChangeWeather();
  9.    }
  10.  
  11.    public void weatherchanged() {
  12.       this.ChangeWeather();
  13.    }
  14.  
  15.    public void ChangeWeather() {
  16.       if (this.weatherEffectGUID != 0) {
  17.          this.weatherEffect = new CodexThing(this.weatherEffectGUID);
  18.          this.weatherEffect.Remove();
  19.          this.weatherEffectGUID = 0;
  20.       }
  21.  
  22.       this.weatherEffectName = Codex.GetWeatherEffect();
  23.       if (!this.weatherEffectName.equalsIgnoreCase("")) {
  24.          this.weatherEffectGUID = this.weatherThing.SpawnThing(this.weatherEffectName);
  25.       }
  26.  
  27.    }
  28. }
  29.