Ejemplo n.º 1
0
 /// <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();
     }
 }
Ejemplo n.º 2
0
        /// <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();
            }
        }