コード例 #1
0
 public static AudioClip GetCreaturePartAudioClip(BASE_SPECIES species, CreaturePart part)
 {
     if (species == BASE_SPECIES.Gnat)
     {
         if (part == CreaturePart.BRAKE)
         {
             return(RAKUtilities.getAudioClip("GnatBrake"));
         }
     }
     return(null);
 }
コード例 #2
0
ファイル: RAKWeather.cs プロジェクト: Rakjavik/EmergenceOfRak
 public void start(Transform master, RAKTerrainMaster masterTerrain, GameObject sun)
 {
     this.sun           = sun;
     this.masterTerrain = masterTerrain;
     windZone           = master.gameObject.GetComponent <WindZone>();
     audioClips         = new RAKAudioClip[2];
     audioClips[0]      = new RAKAudioClip(RAKUtilities.getAudioClip(RAKUtilities.AUDIO_CLIP_RAIN_LIGHT));
     audioClips[1]      = new RAKAudioClip(RAKUtilities.getAudioClip(RAKUtilities.AUDIO_CLIP_WIND_MEDIUM));
     rainPrefab         = RAKUtilities.getPrefab("RainPrefab");
     audioSource        = master.gameObject.AddComponent <AudioSource>();
     audioSource.clip   = audioClips[0].audioClip;
     audioSource.loop   = true;
     windAudio          = master.gameObject.AddComponent <AudioSource>();
     windAudio.clip     = audioClips[1].audioClip;
     windAudio.loop     = true;
     setWeather(WeatherType.Clear);
     initialized = true;
 }