Пример #1
0
    public void OpenChooseBuildingMenu()
    {
        if (currentL != null)
        {
            btnChooseUnit.CleanState();

            int[]    louHaoIntGorup           = currentL.GetDistinctLouHao(currentL.selectHXInstance);
            string[] louHaoStringGorup        = new string[louHaoIntGorup.Length];
            string[] louHaoStringGorupDisplay = new string[louHaoIntGorup.Length];

            for (int i = 0; i < louHaoStringGorup.Length; i++)
            {
                louHaoStringGorup[i]        = louHaoIntGorup[i].ToString();
                louHaoStringGorupDisplay[i] = louHaoIntGorup[i].ToString() + " #";
                if (louHaoNameDictionary != null && louHaoNameDictionary.ContainsKey(louHaoIntGorup[i]))
                {
                    louHaoStringGorupDisplay[i] = louHaoNameDictionary[louHaoIntGorup[i]];
                }
            }

            btnChooseUnitBase.transform.DOLocalMoveY(-700, 0.3f);
            buildScrollMenuBase.DOAnchorPos(new Vector2(0, 0), 0.3f);
            hxInstanceScrollMenuBase.DOAnchorPos(new Vector2(0, -700), 0.3f);

            buildScrollMenu.CreateItemGroup(louHaoStringGorupDisplay, louHaoStringGorup);
        }
    }
Пример #2
0
    public void ChooseBuildingNo(string louID)
    {
        Debug.Log(louID);
        SetBuildingLayer(buildTextLabel.text, 0);
        buildTextLabel.text = louID;
        SetBuildingLayer(louID, 30);
        btnChooseBuild.CleanState();

        btnChooseUnit.SetBtnState(true, 0);
        if (unitScrollMenu.GetFirstScrollItem() != null)
        {
            unitScrollMenu.GetFirstScrollItem().GetComponent <ImageButton>().SetBtnState(true, 0);
        }
    }
Пример #3
0
    public void OpenChooseBuildingMenu()
    {
        if (louPanManager != null)
        {
            btnChooseUnit.CleanState();

            int[]    louHaoIntGorup           = louPanManager.GetDistinctLouHao(louPanManager.selectHXInstance);
            string[] louHaoStringGorup        = new string[louHaoIntGorup.Length];
            string[] louHaoStringGorupDisplay = new string[louHaoIntGorup.Length];

            for (int i = 0; i < louHaoStringGorup.Length; i++)
            {
                louHaoStringGorup[i]        = louHaoIntGorup[i].ToString();
                louHaoStringGorupDisplay[i] = louHaoIntGorup[i].ToString() + " #";
            }

            btnChooseUnitBase.transform.DOLocalMoveY(-700, 0.3f);
            buildScrollMenuBase.DOAnchorPos(new Vector2(0, 0), 0.3f);
            hxInstanceScrollMenuBase.DOAnchorPos(new Vector2(0, -700), 0.3f);

            buildScrollMenu.CreateItemGroup(louHaoStringGorupDisplay, louHaoStringGorup);
        }
    }
Пример #4
0
    public void ChooseBuildingNo(string louID)
    {
        Debug.Log(louID);
        SetBuildingLayer(currentLouID, 0);
        buildTextLabel.text = louID;

        currentLouID = int.Parse(louID);

        if (louHaoNameDictionary != null && louHaoNameDictionary.ContainsKey(currentLouID))
        {
            buildTextLabel.text = louHaoNameDictionary[currentLouID];
        }

        SetBuildingLayer(currentLouID, 30);
        btnChooseBuild.CleanState();

        btnChooseUnit.SetBtnState(true, 0);

        if (unitScrollMenu.GetFirstScrollItem() != null)
        {
            unitScrollMenu.GetFirstScrollItem().GetComponent <ImageButton>().SetBtnState(true, 0);
        }
    }