コード例 #1
0
    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);
    }
コード例 #2
0
    // 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);
    }
コード例 #3
0
 public void HandShake(BoardManagerScript theBoard, QTableScript theQTableScript)
 {
     boardManager = theBoard;
     qTableScript = theQTableScript;
 }
コード例 #4
0
 // Start is called before the first frame update
 void Start()
 {
     boardScript = boardManager.GetComponent <BoardManagerScript>();
     menuPanel.SetActive(true);
 }