diff options
| author | chai <215380520@qq.com> | 2024-05-19 16:46:27 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2024-05-19 16:46:27 +0800 |
| commit | 8b1fc7063b387542803c6bc214ccf8acb32870bd (patch) | |
| tree | d310eb99872c8215f1c1f67731ec21f0915cd778 /Thronefall_1_0/GameCode/PerkManager.cs | |
| parent | 8e13e7e2874adc8982e16d1d2ed2e28d7480b45f (diff) | |
* rename
Diffstat (limited to 'Thronefall_1_0/GameCode/PerkManager.cs')
| -rw-r--r-- | Thronefall_1_0/GameCode/PerkManager.cs | 193 |
1 files changed, 0 insertions, 193 deletions
diff --git a/Thronefall_1_0/GameCode/PerkManager.cs b/Thronefall_1_0/GameCode/PerkManager.cs deleted file mode 100644 index 540b858..0000000 --- a/Thronefall_1_0/GameCode/PerkManager.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; - -public class PerkManager : MonoBehaviour -{ - public const int MaxLevel = 1000000; - - public static PerkManager instance; - - [Header("Equippables: ")] - [SerializeField] - private List<Equippable> currentlyEquipped; - - [SerializeField] - private List<Equippable> unlockedEquippables; - - [Header("Leveling system: ")] - public int xp; - - public int level = 1; - - [SerializeField] - private List<MetaLevel> metaLevels; - - public float heavyArmor_HpMultiplyer; - - public float heavyArmor_SpeedMultiplyer; - - public float godsLotion_RegenRateMultiplyer; - - public float godsLotion_RegenDelayMultiplyer; - - public float racingHorse_SpeedMultiplyer; - - public float gladiatorSchool_TrainingSpeedMultiplyer; - - public float elliteWarriors_TrainingSpeedMultiplyer; - - public float tauntTheTiger_damageMultiplyer; - - public Equippable tigerGodPerk; - - public float tauntTheTurtle_hpMultiplyer; - - public Equippable turtleGodPerk; - - public float tauntTheFalcon_speedMultiplyer; - - public float tauntTheFalcon_chasePlayerTimeMultiplyer; - - public Equippable falconGodPerk; - - public Equippable ratGodPerk; - - public Equippable warriorMode; - - public float warriorModeAllyDmgMulti = 0.5f; - - public float warriorModeSelfDmgMultiMax = 2f; - - public Equippable commanderMode; - - public float commanderModeAllyDmgMulti = 1.5f; - - public float commanderModeSelfDmgMulti = 0.5f; - - public Equippable glassCanon; - - public float glassCanon_dmgMulti = 1.5f; - - public Equippable healintSpirits; - - public float healingSpirits_healMulti = 1.5f; - - public Equippable iceMagic; - - public float iceMagic_AdditionalsSlowMutli = 0.75f; - - public float iceMagic_SlowDurationMulti = 2f; - - public Equippable rangedResistence; - - public float rangedResistence_AmountMulti = 1.3f; - - public Equippable meleeResistence; - - public float meleeResistence_AmountMulti = 1.3f; - - public float powerTower_attackSpeedBonus = 2f; - - public Equippable treasureHunter; - - public int treasureHunterGoldAmount = 40; - - public Equippable cheeseGod; - - public Equippable godOfDeath; - - public float godOfDeath_playerRespawnMultiplyer = 2f; - - public Equippable destructionGod; - - public List<Equippable> UnlockedEquippables => unlockedEquippables; - - public List<Equippable> CurrentlyEquipped => currentlyEquipped; - - public List<MetaLevel> MetaLevels => metaLevels; - - public MetaLevel NextMetaLevel - { - get - { - if (level - 1 >= metaLevels.Count || level >= 1000000) - { - return null; - } - return metaLevels[level - 1]; - } - } - - public bool WarriorModeActive => IsEquipped(warriorMode); - - public bool CommanderModeActive => IsEquipped(commanderMode); - - public bool GlassCanonActive => IsEquipped(glassCanon); - - public bool HealingSpiritsActive => IsEquipped(healintSpirits); - - public bool IceMagicActive => IsEquipped(iceMagic); - - public bool RangedResistenceActive => IsEquipped(rangedResistence); - - public bool MeleeResistenceActive => IsEquipped(meleeResistence); - - public bool TreasureHunterActive => IsEquipped(treasureHunter); - - public bool CheeseGodActive => IsEquipped(cheeseGod); - - public bool GodOfDeathActive => IsEquipped(godOfDeath); - - public bool DestructionGodActive => IsEquipped(destructionGod); - - private void Awake() - { - if ((bool)instance) - { - Object.Destroy(base.gameObject); - return; - } - instance = this; - Object.DontDestroyOnLoad(base.transform.root.gameObject); - } - - public static bool IsEquipped(Equippable _perk) - { - if (!instance) - { - return false; - } - return instance.currentlyEquipped.Contains(_perk); - } - - public static void SetEquipped(Equippable _perk, bool _equipped) - { - if (!instance) - { - return; - } - if (_equipped) - { - if (!instance.currentlyEquipped.Contains(_perk)) - { - instance.currentlyEquipped.Add(_perk); - } - } - else if (instance.currentlyEquipped.Contains(_perk)) - { - instance.currentlyEquipped.Remove(_perk); - } - } - - public void CallAfterLoadToUnlockPerksAndStuff() - { - level = Mathf.Min(level, 1000000); - for (int i = 0; i < Mathf.Min(metaLevels.Count, level - 1); i++) - { - if (!unlockedEquippables.Contains(metaLevels[i].reward) || metaLevels[i].reward.GetType() == typeof(PerkPoint)) - { - unlockedEquippables.Add(metaLevels[i].reward); - } - } - } -} |
