コード例 #1
0
 private void OnGoodSpaceShipHPChanged()
 {
     if (GoodSpaceShipHPChanged != null)
     {
         GoodSpaceShipHPChanged.Invoke(this, new PointsEventArgs {
             HitPoints = _goodSpaceShipHitPoints
         });
     }
 }
コード例 #2
0
 public void GoodSpaceShipGotDamaged(int damage)
 {
     if (GoodSpaceShipHPChanged != null)
     {
         GoodSpaceShipHPChanged.Invoke(this, new PointsEventArgs()
         {
             HitPoints = damage
         });
     }
 }
コード例 #3
0
 public void GoodSpaceShipGotExtraHP(int extra)
 {
     if (GoodSpaceShipHPChanged != null)
     {
         GoodSpaceShipHPChanged.Invoke(this,
                                       new PointsEventArgs()
         {
             HitPoints = _goodSpaceShipHitPoints + extra
         });
     }
 }
コード例 #4
0
 public void GoodSpaceShipHPChangedEventHandler(object sender, PointEventArgs e)
 {
     GoodSpaceShipHPChanged?.Invoke(sender, e);
 }