Esempio n. 1
0
 protected override bool OnContact(Figure figure)
 {
     float damage = Owner.IsEnemy(figure.Owner) ? Damage : 0;
     figure.OnAttack(this, damage);
     return true;
 }
Esempio n. 2
0
 protected override void OnFigureCollided(Figure figure, int bounceHeight, bool forced)
 {
     if (figure.Owner.IsAlly(Owner))
     {
         if (forced && ap.CurrValue <= 0)
         {
             figure.OnAttack(this, penaltiAllyAttack.Calculate(-bounceHeight));
         }
     }
     else
     {
         figure.OnAttack(this, simpleAttack.Calculate(-bounceHeight));
     }
 }