void Start() { rdmobj = GameObject.Find("RdmGen").GetComponent <RdmObjGen>(); btnShield = gameObject.GetComponent <Button>(); scoreCounter = GameObject.Find("subScoreCounter").GetComponent <scoreCounter>(); achPowerTripScript = GameObject.Find("btnBoost").GetComponent <achPowerTripper>(); }
void Start() { rdmobj = GameObject.Find("RdmGen").GetComponent <RdmObjGen>(); spawnPointProjectile = GameObject.Find("spawnPointProjectile"); btnAttack = gameObject.GetComponent <Button>(); cooldownAttackScript = GameObject.Find("cooldownAttack").GetComponent <cooldownAttack>(); scoreCounter = GameObject.Find("subScoreCounter").GetComponent <scoreCounter>(); achPowerTripScript = GameObject.Find("btnBoost").GetComponent <achPowerTripper>(); }
// Use this for initialization void Start() { scoreCounter = GameObject.Find("subScoreCounter").GetComponent <scoreCounter>(); PlayerPrefs.SetInt("boost3timesAch", 0); boostLane = GameObject.Find("BoostLane"); btnShield = GameObject.Find("btnShield").GetComponent <Button>(); btnAttack = GameObject.Find("btnAttack").GetComponent <Button>(); btnBoost = GameObject.Find("btnBoost").GetComponent <Button>(); btnPause = GameObject.Find("Pause"); maincam = GameObject.Find("Main Camera"); swipeScript = maincam.gameObject.GetComponent <SwipeMovement>(); boostPropScript = GameObject.FindGameObjectWithTag("Player").GetComponent <boostProp>(); cDownAttack = GameObject.Find("cooldownAttack").GetComponent <cooldownAttack>(); cDownShield = GameObject.Find("cooldownShield").GetComponent <cooldownShield>(); pauseScript = GameObject.Find("onPause").GetComponent <pauseScale>(); achPowerTripScript = GameObject.Find("btnBoost").GetComponent <achPowerTripper>(); if (PlayerPrefs.HasKey("boostSkillLvl")) { boostSkillLvl = PlayerPrefs.GetInt("boostSkillLvl"); } else { boostSkillLvl = 0; } if (boostbarSlider.value <= 0f && boostSkillLvl >= 1) { if (!isRunning) { regenBoost(); } } coroutine = WaitAndUpdate(1.0f); StartCoroutine(coroutine); }