void Start() { nextPathUpdate = Time.time; if (!moves) { shooting.canRotateParent = true; if (navAgent != null) { Destroy(navAgent); } } if (defaultWeapon == "None") { return; } shooting.SetWeapon(WeaponManager.instance.GetDataFromName(defaultWeapon)); priorityRange = shooting.range; if (moves) { navAgent.stoppingDistance = Mathf.Max(shooting.range - 4, 3f); } }
void Start() { nextPathUpdate = Time.time; if (!moves) { shooting.canRotateParent = true; if (navAgent != null) { Destroy(navAgent); } } if (defaultWeapon == "None") { return; } shooting.SetWeapon(WeaponManager.instance.GetDataFromName(defaultWeapon)); }