Exemple #1
0
        private void UpdateThunder()
        {
            if (ThunderAndLightningScript != null)
            {
                if (Input.GetKeyDown(KeyCode.Alpha1))
                {
                    ThunderAndLightningScript.CallNormalLightning();
                }
                else if (Input.GetKeyDown(KeyCode.Alpha2))
                {
                    ThunderAndLightningScript.CallIntenseLightning();
                }
                else if (Input.GetKeyDown(KeyCode.Alpha3))
                {
                    if (CloudParticleSystem != null)
                    {
#if UNITY_5_5_OR_NEWER
                        var m = CloudParticleSystem.main;
                        m.simulationSpeed = (m.simulationSpeed == 1.0f ? fastCloudSpeed : 1.0f);
#else
                        CloudParticleSystem.playbackSpeed = (CloudParticleSystem.playbackSpeed == 1.0f ? fastCloudSpeed : 1.0f);
#endif
                    }
                }
            }
        }
Exemple #2
0
 private void UpdateThunder()
 {
     if (ThunderAndLightningScript != null)
     {
         if (Input.GetKeyDown(KeyCode.Alpha1))
         {
             ThunderAndLightningScript.CallNormalLightning();
         }
         else if (Input.GetKeyDown(KeyCode.Alpha2))
         {
             ThunderAndLightningScript.CallIntenseLightning();
         }
         else if (Input.GetKeyDown(KeyCode.Alpha3))
         {
             if (CloudParticleSystem != null)
             {
                 CloudParticleSystem.playbackSpeed = (CloudParticleSystem.playbackSpeed == 1.0f ? fastCloudSpeed : 1.0f);
             }
         }
     }
 }
Exemple #3
0
 private void UpdateThunder()
 {
     if (ThunderAndLightningScript != null)
     {
         if (Input.GetKeyDown(KeyCode.Alpha1))
         {
             ThunderAndLightningScript.CallNormalLightning();
         }
         else if (Input.GetKeyDown(KeyCode.Alpha2))
         {
             ThunderAndLightningScript.CallIntenseLightning();
         }
         else if (Input.GetKeyDown(KeyCode.Alpha3))
         {
             if (CloudParticleSystem != null)
             {
                 ParticleSystem.MainModule main = CloudParticleSystem.main;
                 main.simulationSpeed = (CloudParticleSystem.main.simulationSpeed == 1.0f ? fastCloudSpeed : 1.0f);
             }
         }
     }
 }