コード例 #1
0
    public override void Awake()
    {
        base.Awake();

        dataPath      = Application.dataPath;
        imagesDirPath = dataPath + "/Images";
        workPath      = dataPath + "/TEX";
        errorLogPath  = workPath + "/errorLog.txt";
        outputLogPath = workPath + "/outputLog.txt";
        batPath       = workPath + "/textopng.bat";

        if (!Directory.Exists(imagesDirPath))
        {
            Directory.CreateDirectory(imagesDirPath);
        }

        displayOn = false;
        loadingOn = false;

        errorPanel                   = canvas.transform.GetChild(2).gameObject;
        errorMan                     = errorPanel.GetComponentInChildren <ErrorMan>();
        viewingPanel                 = canvas.transform.GetChild(1).gameObject;
        vpCanvasGroup                = viewingPanel.GetComponent <CanvasGroup> ();
        vpCanvasGroup.alpha          = 0;
        vpCanvasGroup.blocksRaycasts = vpCanvasGroup.interactable = false;
        FileBrowser                  = this.GetComponentInChildren <BrowserMan>();
    }
コード例 #2
0
 public override void Awake()
 {
     base.Awake();
     gameSettings1    = transform.GetChild(1).gameObject;
     gameSettings2    = transform.GetChild(2).gameObject;
     playerNameInputs = new GameObject[6];
     for (int i = 0; i < 6; i++)
     {
         playerNameInputs[i] = gameSettings2.transform.GetChild(1).GetChild(i).gameObject;
         playerNameInputs[i].SetActive(false);
     }
     sliders     = GetComponentsInChildren <Slider>();
     difficulty  = "";
     course      = "";
     theme       = "";
     numPlayers  = 0;
     matchRounds = 0;
     sliders[0].transform.parent.GetComponentInChildren <Text>().text = "2";
     sliders[1].transform.parent.GetComponentInChildren <Text>().text = "2";
     errorPanel = canvas.transform.GetChild(2).gameObject;
     errorMan   = errorPanel.GetComponentInChildren <ErrorMan>();
     resetPanel();
 }