public void TeleportToCell(BoardCell cell) { if (Cell) { Cell.FreeFrom(Unit); } Cell = cell; cell.OccupyBy(Unit); transform.position = cell.transform.position; CoroutineExt.Stop(ref moveCoroutine, this); }
private void OnHidden() { gameObject.SetActive(false); CoroutineExt.Stop(ref fillCoroutine, HealthBars); if (shouldDestroyAfterHide) { Destroy(gameObject); } HealthBars.UnRegisterHealthBar(this); }