// Update is called once per frame void Update() { myScoreHandler = GameObject.FindGameObjectWithTag("ScoreHandler").GetComponent<scoreHandler>(); if (gameLost) { //Time.timeScale = 0.0f; youLostMenu.enabled = true; } }
void Awake() { DontDestroyOnLoad(gameObject); //highScoreText = GameObject.FindGameObjectWithTag("highScore").GetComponent<Text>(); //scoreText = GameObject.FindGameObjectWithTag("score").GetComponent<Text>(); if (scoreH == null) { //DontDestroyOnLoad(gameObject); scoreH = this; } else if (scoreH != this) { Destroy(gameObject); } }
void Start() { scoreBoard = GameObject.FindGameObjectWithTag("ScoreHandler").GetComponent<scoreHandler>(); timer = GameObject.FindGameObjectWithTag("NotUITimer").GetComponent<gameTimer>(); gridPoints = new BlockPhysics[width, height]; anchorPoints = new Vector3[width, height]; InitializeGrid(); FillAnchorPoints(); CreateNewBlockRow(); CreateNewBlockRow(); CreateNewBlockRow(); }