Exemplo n.º 1
0
        public void Activate(Activateable act)
        {
            CurrentActivateable = act;
            Enabled             = false;

            CurrentActivateable.PopActivator(this);
            Action.Invoke();
        }
Exemplo n.º 2
0
        private void OnTriggerExit(Collider other)
        {
            var act = other.gameObject.GetComponentInChildren <Activateable>() ?? other.gameObject.GetComponentInParent <Activateable>();

            if (act)
            {
                act.PopActivator(this);
            }

            CurrentActivateable = null;
        }