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

        CoroutineExt.Stop(ref fillCoroutine, HealthBars);

        if (shouldDestroyAfterHide)
        {
            Destroy(gameObject);
        }

        HealthBars.UnRegisterHealthBar(this);
    }