Example #1
0
 public Building(BuildingGameObject game, int income, float capturePoints, bool canProduce,
                 float damageToCapturingUnit, float capturePointsDecreasedBy, int fowLos, int attackRange, float damage,
                 Dictionary <UnitTypes, float> modifiers)
 {
     BuildingGameObject       = game;
     Income                   = income;
     CapturePoints            = capturePoints;
     CurrentCapturePoints     = 0;
     CanProduce               = canProduce;
     DamageToCapturingUnit    = damageToCapturingUnit;
     CapturePointsDecreasedBy = capturePointsDecreasedBy;
     FowLineOfSightRange      = fowLos;
     AttackRange              = attackRange;
     Damage                   = damage;
     Modifiers                = modifiers;
 }
Example #2
0
 public void ResetCurrentCapturePoints()
 {
     CurrentCapturePoints = 0f;
     BuildingGameObject.UpdateCapturePointsText();
 }
Example #3
0
 public void DecreaseCapturePointsBy(float decreaseBy)
 {
     CurrentCapturePoints -= decreaseBy;
     CurrentCapturePoints  = Mathf.Clamp(CurrentCapturePoints, 0f, CapturePoints);
     BuildingGameObject.UpdateCapturePointsText();
 }