Example #1
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.GetComponentInParent <NpcType>() != _spawningNpc)
        {
            _dockingNpcNav = other.gameObject.GetComponentInParent <AINavigator>();
            if (_dockingNpcNav != null)
            {
                _dockingNpcNav.Dock(type);
            }
        }

        //if (_dockingNpcNav != null && _dockingNpcNav.Destination == this.gameObject)
        //{
        //    _dockingNpcNav.DestinationReached += OtherNav_DestinationReached;
        //}
    }
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.GetComponentInParent<NpcType>() != _spawningNpc)
        {
            _dockingNpcNav = other.gameObject.GetComponentInParent<AINavigator>();
            if (_dockingNpcNav != null)
            {
                _dockingNpcNav.Dock(type);
            }
        }

        //if (_dockingNpcNav != null && _dockingNpcNav.Destination == this.gameObject)
        //{
        //    _dockingNpcNav.DestinationReached += OtherNav_DestinationReached;
        //}
    }