예제 #1
0
    // Use this for initialization
    void Start()
    {
        matrix             = FindObjectOfType <MatrixCodeReader>();
        sdReader           = FindObjectOfType <SaveDataReader>();
        currentSaveDataNum = sdReader.saveDataNum;
        isOpen             = sdReader.GetAllMatrixIsOpenBool(currentSaveDataNum);
        int n = sdReader.GetMatrixOpenNum(currentSaveDataNum);

        Buttons     = new GameObject[n];
        sortNumList = new int[n];

        int[] nums = sdReader.GetMatrixOpenNumbers();
        for (int i = 0; i < nums.Length; i++)
        {
            Buttons[i] = (GameObject)Instantiate(ButtonPref);
            Buttons[i].GetComponent <SelectMatrixNum>().SetMatNum(nums[i]);//番号をボタンにセット
            Buttons[i].GetComponent <SelectMatrixNum>().SetPanel(this.gameObject);
            Buttons[i].transform.SetParent(view.transform, false);
            sortNumList[i] = matrix.GetComponent <MatrixCodeReader>().GetMatSortNum(nums[i]);
        }
    }
예제 #2
0
 public bool isOpenMatrix(int i)//sdReaderからそれが解放済みか確認してくる。
 {
     bool[] b = sdReader.GetAllMatrixIsOpenBool();
     return(b[i]);
 }