public void addResourcesToFaction(Harvester harvester) { Unit unit = harvester.GetComponent <Unit>(); Assert.IsNotNull(unit); m_factions[(int)unit.getFactionName()].addResources(harvester); }
void Start() { finishedSound = gameObject.GetComponent <AudioSource>(); BasicAttackRange = BasicUnit.GetComponent <Attack>().AttackRange; BasicSpeed = BasicUnit.GetComponent <NavMeshAgent>().speed; BasicHealthLevel = BasicUnit.GetComponent <Health>().HealthLevel; AdvancedAttackRange = AdvancedUnit.GetComponent <Attack>().AttackRange; AdvancedSpeed = AdvancedUnit.GetComponent <NavMeshAgent>().speed; AdvancedHealthLevel = AdvancedUnit.GetComponent <Health>().HealthLevel; HarvesterSpeed = Harvester.GetComponent <NavMeshAgent>().speed; HarvesterHealthLevel = Harvester.GetComponent <Health>().HealthLevel; }