コード例 #1
0
        public override void OnTriggerEnter(Collider _collider)
        {
            if (IsRemoteClient)
            {
                return;
            }

            if (_collider == null)
            {
                return;
            }

            ICECreatureEntity _entity = _collider.gameObject.GetComponent <ICECreatureEntity>();

            if (_entity != null)
            {
                if (DebugLogIsEnabled)
                {
                    PrintDebugLog("OnTriggerEnter - " + _entity.name + " enter zone.");
                }

                ICECreatureZone _zone = _entity as ICECreatureZone;
                if (_zone != null)
                {
                    EnterZone(_zone.name);
                }

                ICECreatureControl _creature = _entity as ICECreatureControl;
                if (_creature != null)
                {
                    _creature.Creature.UpdateStatusInfluences(Influences);
                }
            }
        }
コード例 #2
0
        private void HandleLadder(bool _open, GameObject _object)
        {
            ICEWorldEntity _entity = (_object != null ? _object.GetComponent <ICEWorldEntity>() : null);

            if (_entity == null)
            {
                return;
            }

            if (_entity.EntityType == EntityClassType.Creature)
            {
                ICECreatureControl _creature = _entity as ICECreatureControl;
                if (_creature == null)
                {
                    return;
                }

                /*
                 * if( _creature.Creature.ActiveTargetVerticalDistance > 0 )
                 *      Debug.Log( "CLIMB UP" );
                 * else
                 *      Debug.Log( "CLIMB DOWN" );*/
            }
            else if (_entity.EntityType == EntityClassType.Player)
            {
                ICECreaturePlayer _player = _entity as ICECreaturePlayer;
                if (_player == null)
                {
                    return;
                }
            }
        }
コード例 #3
0
        //********************************************************************************
        // OnEnable
        //********************************************************************************
        public virtual void OnEnable()
        {
            m_creature_control = (ICECreatureControl)target;
            //m_creature_register = FindObjectOfType<ICECreatureRegister>();

            if (m_creature_control != null)
            {
                m_creature_debug = m_creature_control.gameObject.GetComponent <ICECreatureControlDebug>();
            }
        }