예제 #1
0
    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);
    }
예제 #2
0
    private void OnHidden()
    {
        gameObject.SetActive(false);

        CoroutineExt.Stop(ref fillCoroutine, HealthBars);

        if (shouldDestroyAfterHide)
        {
            Destroy(gameObject);
        }

        HealthBars.UnRegisterHealthBar(this);
    }