public void EndPosion(OnStatusEndEventData e) { StatusCollection Collection = e.Target.GetComponentInChildren <StatusCollection>(); if (Collection != null) { Collection.RemoveStatus(Status); } ColorShifter shifter = e.Target.GetComponentInChildren <ColorShifter>(); if (shifter != null) { shifter.ShiftToColor( new Color(0f, 1f, 0f, 1f), new Color(1f, 1f, 1f, 1f), 1f ); StartCoroutine(DestroyAfter(1f)); } else { Destroy(gameObject); } }
public void EndConfusion(OnStatusEndEventData e) { MovableBody movableBody = e.Target.GetComponentInChildren <MovableBody>(); if (movableBody != null) { RemoveLastRandomMovement(movableBody); } StatusCollection Collection = e.Target.GetComponentInChildren <StatusCollection>(); if (Collection != null) { Collection.RemoveStatus(Status); } ColorShifter shifter = e.Target.GetComponentInChildren <ColorShifter>(); if (shifter != null) { shifter.ShiftToColor( new Color(1f, 1f, 0f, 1f), new Color(1f, 1f, 1f, 1f), 1f ); StartCoroutine(DestroyAfter(1f)); } else { Destroy(gameObject); } }