Exemple #1
0
        private void OnTriggerExit(Collider other)
        {
            Survivor s = null;

            if (other.gameObject.TryGetComponent(out s))
            {
                OnLost(other);
            }
        }
Exemple #2
0
        /// <summary>
        /// コライダーに接触があったら
        /// </summary>
        /// <param name="other"></param>
        private void OnTriggerEnter(Collider other)
        {
            // 対象がSurvivorかどうかを判定してSurvivorなら殺す
            Survivor s = null;

            if (other.TryGetComponent(out s))
            {
                if (!_isKilled)
                {
                    _agent.isStopped = true;
                    OnKilled();
                    _isKilled = true;
                }
            }
        }