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; } }
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; } }
private void OnDisable() { TreeWindSfx.StopEvent(this.WindEvent); TreeWindSfxManager.Remove(this); }