public void PlayButton() { //play sfx sound.GetSFX(1); //delay 1f StartCoroutine(delay()); SceneManager.LoadScene("ScreenOverLay"); }
public void SettingButtonClicked() { settingBoardButton.SetActive(true); board.SetGameStatus(Board.GameStatus.Pause); //play sfx sfx.GetSFX(1); anim.SetBool("isOpen", true); anim.Play("BorderOpen"); }
//init void SetupTiles() { //play sfx sfx.GetSFX(0); foreach (StartingTile sTile in startingTile) { if (sTile != null) { MakeTile(sTile.tilePrefap, sTile.x, sTile.y, sTile.z); } } for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { if (m_allTiles[i, j] == null) { MakeTile(tileNormalPrefab, i, j); } } } }
public void TimeCountDown() { timeLimit -= Time.deltaTime; timeText.text = ((int)timeLimit + 1).ToString(); if (timeLimit <= 0f) { settingButton.GetComponent <Button>().interactable = false; timeText.text = "0"; board.SetGameStatus(Board.GameStatus.Finished); //play sfx sfx.GetSFX(5); //change bgm StartCoroutine(bgm.FadeOut(1f)); //show Border Retry Animator anim = GameObject.Find("RetryBoard").GetComponent <Animator>(); anim.Play("Border"); anim.SetBool("isOpen", true); anim.Play("BorderOpen"); } }