protected virtual bool CanTargetObject(GameplayObject target)
 {
     if (m_targetCandidate == null || m_targetCandidate.IsDead() ||
         !CanSeeObject(m_targetCandidate))
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
Пример #2
0
 protected virtual void Hit()
 {
     // If we still have a valid target, damage it.
     if (m_intendedTarget != null &&
         !m_intendedTarget.IsDead())
     {
         // Inflict it random damage.
         m_intendedTarget.TakeDamage(this,
                                     m_attackDamage.GetValue());
     }
     Die();
 }
 protected virtual bool HaveEnemyTarget()
 {
     return(m_enemyTarget != null && !m_enemyTarget.IsDead());
 }