Esempio n. 1
0
 void Awake()
 {
     sdReader     = Instantiate(sdReaderPref).GetComponent <SaveDataReader>();
     hp.text      = sdReader.GetHP().ToString();
     power.text   = sdReader.GetPOWER().ToString();
     mpower.text  = sdReader.GetMAJICPOWER().ToString();
     sp.text      = sdReader.GetSP().ToString();
     spr.text     = sdReader.GetSPRECOVER().ToString();
     def.text     = sdReader.GetDEFENCE().ToString();
     comNum.text  = sdReader.GetCommandNum().ToString();
     openNum.text = sdReader.GetMatrixOpenNum().ToString();
 }
Esempio n. 2
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]);
        }
    }