private void Start() { canTakeDamage = true; camAnimator = ActiveCamera.GetComponent <Animator>(); inhaleScript = GetComponent <Inhale>(); inhaleSliderImage = inhaleSlider.GetComponentInChildren <Image>(); damageScreenAnimator = damageScreen.GetComponent <Animator>(); camAnimator = ActiveCamera.GetComponent <Animator>(); fxPlayerAudioSource = fxPlayer.GetComponent <AudioSource>(); deathScreenScript = deathScreen.GetComponent <Darkend>(); }
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"); }
private void Start() { //Assign components to variables rigid = GetComponent <Rigidbody2D>(); player = GameObject.FindGameObjectWithTag("Player").transform; playerDetectorScript = playerDetector.GetComponent <PlayerDetector>(); rightSideDetectorScript = rightDetector.GetComponent <EnemySideDetector>(); leftSideDetectorScript = leftDetector.GetComponent <EnemySideDetector>(); dashDampScript = player.GetComponent <DashDamp>(); inhaleScript = player.GetComponent <Inhale>(); playerRigidBody = player.GetComponent <Rigidbody2D>(); enemyHeadColliderScript = GetComponentInChildren <EnemyHeadCollider>(); playerLifeSystem = player.GetComponent <LifeSystem>(); //Get the Scale of the Object; objectScale = transform.localScale; //Invoke the Jump method InvokeRepeating("Jump", 0, jumpTimeStep); }