public void UpdateProjectileStats(int _towerPath, int _towerLevel) { assignedStats = projectileStatsTracker.UpgradeProjectileStats(_towerPath, _towerLevel); //Gets the projectile stats from the projectile tracker assignedStats.ResetStats(); //Makes sure the stats are kept to assigned values delayBetweenAttacks = assignedStats.DelayBetweenAttacks; Damage = assignedStats.ProjectileDamage; }
private void Start() { assignedStats.ResetStats(); Tower = GetComponent <scrTowerTargeting>(); //IMPORTANT: Other scripts will acess the properties in stats. They do not need to run this method, HOWEVER, they cannot acces //the stats in AWAKE. Instead, do it in START. This is done to make sure that the stats are initialized before they are called, as other classes AWAKE //might run before this one. //Assign stats delayBetweenAttacks = assignedStats.DelayBetweenAttacks; Damage = assignedStats.ProjectileDamage; LoadProjectile(); }