Exemplo n.º 1
0
    void Awake()
    {
        #region 初始化数组

        ches = new Chess[8][];
        ches[0] = ch0;
        ches[1] = ch1;
        ches[2] = ch2;
        ches[3] = ch3;
        ches[4] = ch4;
        ches[5] = ch5;
        ches[6] = ch6;
        ches[7] = ch7;

        anims = new Anima[8][];
        anims[0] = an0;
        anims[1] = an1;
        anims[2] = an2;
        anims[3] = an3;
        anims[4] = an4;
        anims[5] = an5;
        anims[6] = an6;
        anims[7] = an7;
        #endregion

        helpMsg = transform.FindChild("helpMsg").GetComponent<UILabel>();
        nextBtn = transform.FindChild("next");
        nextBtn.GetComponent<UIEventListener>().onClick = iKnow;

        chesses = new Transform[10];
    }
Exemplo n.º 2
0
 /// <summary>
 /// Instancian del tablero de fichas
 /// </summary>
 private void InitializeComponents()
 {
     //board instace
     for (int i = 0; i <= 8; i++)
         Board = new Chess[i][];
     for (int j = 0; j < 8; j++)
         Board[j] = new Chess[8];
     for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++)
             Board[i][j] = new Chess();
     //filling disposing
     Cleanse();
 }