コード例 #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
        public override void OnInspectorGUI()
        {
            ICECreatureZone _target = DrawEntityHeader <ICECreatureZone>();

            DrawZoneContent(_target);
            DrawFooter(_target);
        }
コード例 #3
0
        /// <summary>
        /// Draws the content of the zone entity.
        /// </summary>
        /// <param name="_target">Zone Entity.</param>
        public virtual void DrawZoneContent(ICECreatureZone _target)
        {
            if (_target == null)
            {
                return;
            }

            CreatureObjectEditor.DrawInfluenceDataObject(_target.Influences, m_HeaderType);
        }
コード例 #4
0
        public override void OnTriggerExit(Collider _collider)
        {
            if (IsRemoteClient)
            {
                return;
            }

            if (_collider == null)
            {
                return;
            }

            ICECreatureZone _zone = _collider.gameObject.GetComponent <ICECreatureZone>();

            if (_zone != null)
            {
                ExitZone(_zone.name);
            }
        }