Exemple #1
0
 public void Deactivate(float persistTime)
 {
     if (this.WaitingForTimeout)
     {
         if (Time.time >= this.Timeout)
         {
             TreeWindSfx.StopEvent(this.WindEvent);
             this.WindEvent = null;
         }
     }
     else
     {
         this.Timeout           = Time.time + persistTime;
         this.WaitingForTimeout = true;
     }
 }
Exemple #2
0
 public static void CompleteTransfer(Transform destination, EventInstance windEvent)
 {
     if (windEvent != null)
     {
         TreeWindSfx treeWindSfx = null;
         if (destination != null)
         {
             treeWindSfx = destination.GetComponentInChildren <TreeWindSfx>();
         }
         if (treeWindSfx != null)
         {
             treeWindSfx.WindEvent = windEvent;
         }
         else
         {
             TreeWindSfx.StopEvent(windEvent);
         }
         windEvent = null;
     }
 }
Exemple #3
0
 private void OnDisable()
 {
     TreeWindSfx.StopEvent(this.WindEvent);
     TreeWindSfxManager.Remove(this);
 }