void setCountText() { CountText.text = "Score: " + count.ToString(); //goal = leveler.getGoal(); if (count >= 3) { bolt = GameObject.FindGameObjectWithTag("Bolt").GetComponent <BoltScript>(); bolt.Deactivate(); //WinText.text = "YOU WIN!\nDISCO LIVES ON!"; leveler.nextLevel(); } }
void Update() { float fire1 = Input.GetAxis("Fire1"); if (fire1 > 0 && Time.time - lastFire > 0.1f) { BoltScript boltScript = (BoltScript)boltPoolScript.getFree(boltScriptPrefab); boltScript.Fire(transform.localPosition, Vector2.right); lastFire = Time.time; } BorderScript.borderScript.correctPosition(transform, spriteRender.size); }