コード例 #1
0
 private void Awake()
 {
     //there should only be one mapuicontroller
     if (instance == null)
     {
         instance = this;
     }
 }
コード例 #2
0
 private void Awake()
 {
     //there should only be one mapuicontroller
     if (instance == null)
     {
         instance = this;
     }
     //debugText.text = "Cursor Position(Map Pos): " + cursorPosition + "Weight: ";
 }
コード例 #3
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        Prepare();
    }
コード例 #4
0
    private void Awake()
    {
        Instance = this;
        Transform subMaps = transform.Find("SubMaps");

        infoArray   = new SubMapInfo[subMaps.childCount];
        subMapCount = subMaps.childCount;
        for (int i = 0; i < infoArray.Length; ++i)
        {
            Transform subMap = subMaps.GetChild(i);
            infoArray[i].mouseEvents   = subMap.GetComponent <MouseEvents>();
            infoArray[i].index         = i;
            infoArray[i].canvas        = subMap.Find("Canvas").gameObject;
            infoArray[i].animation     = infoArray[i].canvas.transform.Find("MapButtonsHolder").GetComponent <MapUIAnimation>();
            infoArray[i].subMapManager = subMap.GetComponent <SubMapManager>();
            infoArray[i].canvas.SetActive(false);
        }
    }