コード例 #1
0
        public override bool TestGameObject(LogicGameObject gameObject)
        {
            if (gameObject.GetComponent(this.m_componentType) != null)
            {
                return(base.TestGameObject(gameObject));
            }

            return(false);
        }
コード例 #2
0
        /// <summary>
        ///     Test the specified gameobject.
        /// </summary>
        public override bool TestGameObject(LogicGameObject gameObject)
        {
            LogicComponent component = gameObject.GetComponent(this._componentType);

            if (component != null && component.IsEnabled())
            {
                return(base.TestGameObject(gameObject));
            }

            return(false);
        }
コード例 #3
0
        public bool IsEnemy(LogicGameObject gameObject)
        {
            LogicHitpointComponent hitpointComponent = (LogicHitpointComponent)gameObject.GetComponent(LogicComponentType.HITPOINT);

            if (hitpointComponent != null && hitpointComponent.GetTeam() != this.m_team)
            {
                return(this.m_hp > 0);
            }

            return(false);
        }