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; }
public void ResetCurrentCapturePoints() { CurrentCapturePoints = 0f; BuildingGameObject.UpdateCapturePointsText(); }
public void DecreaseCapturePointsBy(float decreaseBy) { CurrentCapturePoints -= decreaseBy; CurrentCapturePoints = Mathf.Clamp(CurrentCapturePoints, 0f, CapturePoints); BuildingGameObject.UpdateCapturePointsText(); }