public bool HasUpgradeFunction(UpgradeFunctions upgradeEnum, out UpgradeFunction function) { function = null; if (Upgrades.Any(x => x.UpgradeType == upgradeEnum)) { function = Upgrades.FirstOrDefault(x => x.UpgradeType == upgradeEnum); return(true); } return(false); }
private void Awake() { instance = this; }