// ----- [ Functions ] --------------------------------------------- // --v-- Unity Messages --v-- protected override void Awake() { base.Awake(); _mr = GetComponent <MeshRenderer>(); _maxLife = new ModifiableUpgradableValue <int>(1); _currentLife = _maxLife.Value; }
// ----- [ Functions ] ----------------------------------------------------- // --v-- Unity Messages --v-- protected override void Awake() { base.Awake(); // _mr = GetComponent<MeshRenderer>(); _animator = GetComponent <Animator>(); if (!_bulletPrefab) { Debug.LogWarning("[Player] Missing reference on _bulletPrefab."); } if (!_bulletSpawn) { Debug.LogWarning("[Player] Missing reference on _bulletSpawn."); } // These values need to be reset _fireRateCountdown = 0; _crystals = 0; _maxLife = new ModifiableUpgradableValue <int>( 2, new List <BuyableValue <int> >() { new BuyableValue <int>(3, 150), new BuyableValue <int>(4, 300), new BuyableValue <int>(5, 450), new BuyableValue <int>(6, 600) }, 2); _currentLife = _maxLife.Value; _fireRate = new ModifiableUpgradableValue <float>( 1, new List <BuyableValue <float> >() { new BuyableValue <float>(0.95f, 50), new BuyableValue <float>(0.9f, 50), new BuyableValue <float>(0.85f, 100), new BuyableValue <float>(0.8f, 100), new BuyableValue <float>(0.75f, 200), new BuyableValue <float>(0.7f, 200), new BuyableValue <float>(0.65f, 300), new BuyableValue <float>(0.6f, 300), new BuyableValue <float>(0.55f, 400), new BuyableValue <float>(0.5f, 400), }, 0); _speed = new ModifiableUpgradableValue <float>( 6f, new List <BuyableValue <float> >() { new BuyableValue <float>(6.5f, 100), new BuyableValue <float>(7f, 200), new BuyableValue <float>(7.5f, 300), new BuyableValue <float>(8f, 400), new BuyableValue <float>(8.5f, 500), new BuyableValue <float>(9f, 500), new BuyableValue <float>(9.5f, 550), new BuyableValue <float>(10f, 600), }, 5); }