summaryrefslogtreecommitdiff
path: root/Assembly_CSharp/Building/House.cs
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2023-11-27 00:08:06 +0800
committerchai <215380520@qq.com>2023-11-27 00:08:06 +0800
commitd4af52c91a717d0ee324f81ad5a673d4a6ba9207 (patch)
treebdb610929b8cd3064632f12479cd47c16b752045 /Assembly_CSharp/Building/House.cs
parentb45e22c164fa364263b00ce82842999f8e5976b2 (diff)
*move
Diffstat (limited to 'Assembly_CSharp/Building/House.cs')
-rw-r--r--Assembly_CSharp/Building/House.cs49
1 files changed, 0 insertions, 49 deletions
diff --git a/Assembly_CSharp/Building/House.cs b/Assembly_CSharp/Building/House.cs
deleted file mode 100644
index 16bb26d..0000000
--- a/Assembly_CSharp/Building/House.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System.Collections.Generic;
-using UnityEngine;
-
-public class House : SpawnableObject
-{
- private List<Tower> defenders = new List<Tower>();
-
- [SerializeField]
- private IncomeGenerator myIncomeGenerator;
-
- protected override void Start()
- {
- base.Start();
- SpawnManager.instance.houses.Add(this);
- }
-
- public void AddDefender(Tower t)
- {
- if (!defenders.Contains(t))
- {
- defenders.Add(t);
- }
- CheckTowers();
- }
-
- public void CheckTowers()
- {
- for (int num = defenders.Count - 1; num > -1; num--)
- {
- if (defenders[num] == null)
- {
- defenders.RemoveAt(num);
- }
- }
- myIncomeGenerator.incomeTimesLevel = defenders.Count;
- }
-
- public override void SpawnUI()
- {
- SimpleUI component = Object.Instantiate(UIObject, base.transform.position, Quaternion.identity).GetComponent<SimpleUI>();
- if (defenders.Count > 0)
- {
- string text = "This house is protected by " + defenders.Count + " towers.";
- text = text + "\nIts next gift will be " + (SpawnManager.instance.level + 1) * defenders.Count + "g.";
- text = text + "\nNet gold gifted: " + myIncomeGenerator.netGold + "g.";
- component.SetDiscriptionText(text);
- }
- }
-}