/// <summary> /// Called when this effect is deactivated. Perform resets here. /// </summary> internal void Deactivate() { if (CachedShuriken != null) { CachedShuriken.Stop(); } CachedTransform.SetParent(null); CachedGameObject.SetActive(false); if (OnDeactivate.IsNotNull()) { OnDeactivate(); } }
/// <summary> /// Call this when all parameters are supplied as desired. /// </summary> internal void Initialize() { CachedGameObject.SetActive(true); StartCoroutine(LifeTimer()); if (OnInitialize.IsNotNull()) { OnInitialize(); } if (CachedShuriken != null) { CachedShuriken.startSpeed = StartSpeed; CachedShuriken.startSize = StartSize; CachedShuriken.Play(); } }