public override bool TestGameObject(LogicGameObject gameObject) { if (gameObject.GetComponent(this.m_componentType) != null) { return(base.TestGameObject(gameObject)); } return(false); }
/// <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); }
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); }