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); } } }
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; } } }
//******************************************************************************** // 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>(); } }