private void Start() { player1 = GameObject.Find("Main Camera").GetComponent <PlayerLoad>().player1; player2 = GameObject.Find("Main Camera").GetComponent <PlayerLoad>().player2; m_Character = GetComponent <PlatformerCharacter2D>(); startPosition = transform.position; playerHealthBar = gameObject.GetComponent <PlatformerCharacter2D>().healthBarObject.GetComponent <SimpleHealthBar>(); staminaBar = gameObject.GetComponent <PlatformerCharacter2D>().staminaBarObject.GetComponent <SimpleHealthBar>(); stamina = gameObject.GetComponent <Stamina>(); audioArray = gameObject.GetComponents(typeof(AudioSource)); audioData = new AudioSource[audioArray.Length]; for (int i = 0; i < audioArray.Length; i++) { audioData[i] = (AudioSource)audioArray[i]; } heavyCooldown = gameObject.AddComponent <Cooldown>(); mediumCooldown = gameObject.AddComponent <Cooldown>(); lightCooldown = gameObject.AddComponent <Cooldown>(); lariatCooldown = gameObject.AddComponent <Cooldown>(); damageWait = gameObject.AddComponent <Cooldown>(); animEnd = gameObject.AddComponent <Cooldown>(); moveActive = gameObject.AddComponent <Cooldown>(); tripleJab = gameObject.AddComponent <SpamPrevention>(); tripleJab.init(3, 0.5f); wait = gameObject.AddComponent <Cooldown>(); }