void Start() { animatorNames = GetComponent <AnimatorNames>(); playerMovementScript = GetComponent <PlayerMovement>(); inputManager = GameObject.Find("InputManager"); inputManagerScript = inputManager.GetComponent <InputManager>(); }
void Start() { inputManager = GameObject.Find("InputManager"); inputManagerScript = inputManager.GetComponent <InputManager>(); rb = GetComponent <Rigidbody2D>(); animatorNames = GetComponent <AnimatorNames>(); playerMovementScript = GetComponent <PlayerMovement>(); dashDampScript = GetComponent <DashDamp>(); audioSourceComponent = GetComponent <AudioSource>(); dashTime = startDashTime; }
void Start() { Currentcheckpoint = PlayerPrefs.GetInt("CheckPoint"); player = GameObject.FindGameObjectWithTag("Player"); player.GetComponent <LifeSystem>().ActiveCamera = camCinemachineMain; camAudioSource = cam.GetComponent <AudioSource>(); lifeSystemScript = player.GetComponent <LifeSystem>(); animatorNamesScript = player.GetComponent <AnimatorNames>(); smashScript = player.GetComponent <Smash>(); powerScreenAnimator = powerScreen.GetComponent <Animator>(); inputManager = GameObject.Find("InputManager"); inputManagerScript = inputManager.GetComponent <InputManager>(); camCinemachineMainVirtualCamera = camCinemachineMain.GetComponent <CinemachineVirtualCamera>(); camCinemachineLock1VirtualCamera = camCinemachineLock1.GetComponent <CinemachineVirtualCamera>(); camCinemachineLock2VirtualCamera = camCinemachineLock2.GetComponent <CinemachineVirtualCamera>(); endGameScript = GetComponent <EndGame>(); backgroundParallax = background.GetComponent <Parallax>(); treesParallax = trees.GetComponent <Parallax>(); mixer.SetFloat("MasterVolume", PlayerPrefs.GetFloat("Volume") / volumeScale); if (PlayerPrefs.GetInt("CheckPoint") == 0) { player.transform.position = cp0.position; } else if (PlayerPrefs.GetInt("CheckPoint") == 1) { player.transform.position = cp1.position; UpgradePlayer(2); wallB11.SetActive(true); BossArmsDead = true; Destroy(boss1); camCinemachineMainVirtualCamera.Priority = cameraHighPrority; camCinemachineLock1VirtualCamera.Priority = cameraLowPriority; } else if (PlayerPrefs.GetInt("CheckPoint") == 2) { UpgradePlayer(3); player.transform.position = cp2.position; wallB21.SetActive(true); BossArmsDead = true; BossLegsDead = true; endGameScript.enabled = true; Destroy(boss1); Destroy(boss2); camCinemachineMainVirtualCamera.Priority = cameraHighPrority; camCinemachineLock1VirtualCamera.Priority = cameraLowPriority; camCinemachineLock2VirtualCamera.Priority = cameraLowPriority; EnableLegs(); } }
void Start() { animatorComponent = GetComponent <Animator>(); inputs = GameObject.FindGameObjectWithTag("InputManager"); rb = GetComponent <Rigidbody2D>(); animatorNamesScript = GetComponent <AnimatorNames>(); dashScript = GetComponent <Dash>(); inhaleScript = GetComponent <Inhale>(); smashScript = GetComponent <Smash>(); inputsManagerScript = inputs.GetComponent <InputManager>(); areaEffectorInhale = inhaleZone.GetComponent <AreaEffector2D>(); StartCoroutine("GetKey"); }