private void Start() { if (seed == 0) { seed = Mathf.FloorToInt(Time.deltaTime * 10000000); } Random.InitState(seed); audioSource = gameObject.GetComponent <AudioSource>(); difficultyRegulator = FindObjectOfType <DifficultyRegulator>(); guiTextHandler = FindObjectOfType <GUITextHandler>(); playerController = FindObjectOfType <PlayerController>(); }
private void Start() { if (seed == 0) { seed = Mathf.FloorToInt(Time.deltaTime * 10000000); } Random.InitState(seed); difficultyRegulator = FindObjectOfType <DifficultyRegulator>(); guiTextHandler = FindObjectOfType <GUITextHandler>(); hitPool = GameObject.FindGameObjectWithTag("HitPool").GetComponent <EffectPool>(); killPool = GameObject.FindGameObjectWithTag("KillPool").GetComponent <EffectPool>(); playerController = FindObjectOfType <PlayerController>(); playerHandler = FindObjectOfType <PlayerHandler>(); }
private void Start() { guiTextHandler = FindObjectOfType <GUITextHandler>(); playerController = FindObjectOfType <PlayerController>(); volleyMin = (int)Mathf.Abs(enemyVolleyMin); volleyMax = (int)Mathf.Abs(enemyVolleyMax); /* * defaultPlayerForwardSpeed = playerController.PlayerForwardSpeed; * defaultPlayerRollDelay = playerController.PlayerRollDelay; * defaultPlayerShieldCapacity = playerController.PlayerShieldCapacity; * defaultPlayerShieldChargeRate = playerController.PlayerShieldChargeRate; * defaultPlayerShieldUseRate = playerController.PlayerShieldUseRate; * defaultPlayerWeaponCapacity = playerController.PlayerWeaponCapacity; * defaultPlayerWeaponChargeRate = playerController.PlayerWeaponChargeRate; * defaultPlayerWeaponUseRate = playerController.PlayerWeaponUseRate; * defaultPlayerVolley = playerController.PlayerVolley; */ defaultPlayerStrafeSpeed = playerController.PlayerStrafeSpeed; defaultPlayerWeaponCooldownTime = playerController.PlayerWeaponCoolTime; }