IEnumerator Start() { instance = GetComponent <BoardManagerScript>(); okPanel.gameObject.SetActive(false); okButton.onClick.AddListener(okStart); surrenderButton.onClick.AddListener(surrenderGame); sureExitButton.onClick.AddListener(sureExitGame); stayIntoGameButton.onClick.AddListener(stayIntoGame); refreshButton.onClick.AddListener(restartGame); exitResultButton.onClick.AddListener(sureExitGame); this.updateText(); if (Screen.width <= Screen.height) { var buff = this.xSize; this.xSize = this.ySize; this.ySize = buff; } tiles = new GameObject[xSize, ySize]; yield return(StartCoroutine(this.createTiles())); this.okPanel.SetActive(true); this.turnPaneAndTiles(false); }
// Start is called before the first frame update void Start() { instance = GetComponent <BoardManagerScript>(); M3S = GameObject.Find("Match3Manager").GetComponent <Match3Script>(); Vector2 offset = tile.GetComponent <SpriteRenderer>().bounds.size; CreateBoard(offset.x, offset.y); }
public void HandShake(BoardManagerScript theBoard, QTableScript theQTableScript) { boardManager = theBoard; qTableScript = theQTableScript; }
// Start is called before the first frame update void Start() { boardScript = boardManager.GetComponent <BoardManagerScript>(); menuPanel.SetActive(true); }