From a22c505984697881f5f911a165ee022087b69e09 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 20 May 2024 22:36:58 +0800 Subject: *rename --- Thronefall_1_0/Decompile/PowerTowerPerk.cs | 56 ------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 Thronefall_1_0/Decompile/PowerTowerPerk.cs (limited to 'Thronefall_1_0/Decompile/PowerTowerPerk.cs') diff --git a/Thronefall_1_0/Decompile/PowerTowerPerk.cs b/Thronefall_1_0/Decompile/PowerTowerPerk.cs deleted file mode 100644 index 09466d4..0000000 --- a/Thronefall_1_0/Decompile/PowerTowerPerk.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; - -public class PowerTowerPerk : MonoBehaviour -{ - [SerializeField] - private Equippable powerTowerPerk; - - [SerializeField] - private List mustHaveTags = new List(); - - [SerializeField] - private List mayNotHaveTags = new List(); - - private TagManager tagManager; - - private float attackSpeedBonus; - - private float nextRefreshIn = 0.2f; - - private TaggedObject closestTower; - - private void Start() - { - if (!PerkManager.IsEquipped(powerTowerPerk)) - { - Object.Destroy(this); - return; - } - tagManager = TagManager.instance; - attackSpeedBonus = PerkManager.instance.powerTower_attackSpeedBonus; - } - - private void Update() - { - nextRefreshIn -= Time.deltaTime; - if (nextRefreshIn <= 0f) - { - closestTower = tagManager.FindClosestTaggedObjectWithTags(base.transform.position, mustHaveTags, mayNotHaveTags); - nextRefreshIn = 0.2f; - } - if (closestTower != null) - { - AutoAttack[] componentsInChildren = closestTower.GetComponentsInChildren(); - for (int i = 0; i < componentsInChildren.Length; i++) - { - componentsInChildren[i].ReduceCooldownBy(attackSpeedBonus * Time.deltaTime); - } - HotOilTower[] componentsInChildren2 = closestTower.GetComponentsInChildren(); - for (int i = 0; i < componentsInChildren2.Length; i++) - { - componentsInChildren2[i].ReduceCooldownBy(attackSpeedBonus * Time.deltaTime); - } - } - } -} -- cgit v1.1-26-g67d0