Esempio n. 1
0
    public virtual void SetOut()
    {
        // Make bottommost page
        transform.SetAsFirstSibling();

        // State
        is_in = false;
        SetInteractable(false);

        // Deactivation
        if (deactivate_delay <= 0)
        {
            gameObject.SetActive(false);
        }
        else
        {
            deactivate_routine = StartCoroutine(CoroutineUtil.DoAfterDelay(
                                                    () => gameObject.SetActive(false), deactivate_delay));
        }

        // Events
        if (on_out != null)
        {
            on_out();
        }
        if (on_out_once != null)
        {
            on_out_once();
            on_out_once = null;
        }
    }
Esempio n. 2
0
 private void Respawn()
 {
     OnDrop();
     StartCoroutine(CoroutineUtil.DoAfterDelay(Spawn, 3));
 }