diff options
| author | chai <215380520@qq.com> | 2024-05-19 16:05:01 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2024-05-19 16:05:01 +0800 |
| commit | c5f145786f4c6d2fe4bea831dfc16e52228920a5 (patch) | |
| tree | a6ead7ea8266c767d58ed0f816dcd7a1dd75bd65 /GameCode/FishingHarbour.cs | |
| parent | 48b64e573a1709dc923cb9162b55be0246b3ff63 (diff) | |
* move
Diffstat (limited to 'GameCode/FishingHarbour.cs')
| -rw-r--r-- | GameCode/FishingHarbour.cs | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/GameCode/FishingHarbour.cs b/GameCode/FishingHarbour.cs deleted file mode 100644 index 2214867..0000000 --- a/GameCode/FishingHarbour.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Collections; -using UnityEngine; - -public class FishingHarbour : IncomeModifyer -{ - public int incomeIncreasePerTurn = 1; - - public int maximumIncome = 5; - - private int maximumBoats; - - public Transform activeChildOnIncomeIncrease; - - private int activationNr; - - [Header("Perk Upgrade")] - [SerializeField] - private Equippable perk; - - [SerializeField] - private int additionalBoatCapacity; - - private void Start() - { - buildingInteractor.IncomeModifiers.Add(this); - for (int i = 0; i < activeChildOnIncomeIncrease.childCount; i++) - { - activeChildOnIncomeIncrease.GetChild(i).gameObject.SetActive(value: false); - } - if (PerkManager.instance.CurrentlyEquipped.Contains(perk)) - { - maximumIncome += additionalBoatCapacity; - } - maximumBoats = maximumIncome; - } - - public override void OnDawn() - { - if (buildSlot.Level > 0 && !buildingInteractor.KnockedOutTonight) - { - StartCoroutine(IncreaseIncomeAndBuildShip()); - } - } - - private IEnumerator IncreaseIncomeAndBuildShip() - { - yield return null; - yield return null; - if (activationNr < maximumBoats) - { - activeChildOnIncomeIncrease.GetChild(activationNr).gameObject.SetActive(value: true); - } - activationNr++; - buildSlot.GoldIncome = Mathf.Min(buildSlot.GoldIncome + incomeIncreasePerTurn, maximumIncome); - buildSlot.Upgrades[1].upgradeBranches[0].goldIncomeChange = buildSlot.GoldIncome; - buildSlot.Interactor.MarkAsHarvested(); - } -} |
