Beispiel #1
0
    void Start()
    {
        gci = GameObject.Find("GameManagerInScene").GetComponent <GameControlInNewGame>();

        flagBtnList[0].onClick.AddListener(delegate() { gci.SetFlag(0); UpdateFlag(0); });
        flagBtnList[1].onClick.AddListener(delegate() { gci.SetFlag(1); UpdateFlag(1); });
        flagBtnList[2].onClick.AddListener(delegate() { gci.SetFlag(2); UpdateFlag(2); });
        flagBtnList[3].onClick.AddListener(delegate() { gci.SetFlag(3); UpdateFlag(3); });
        flagBtnList[4].onClick.AddListener(delegate() { gci.SetFlag(4); UpdateFlag(4); });
        flagBtnList[5].onClick.AddListener(delegate() { gci.SetFlag(5); UpdateFlag(5); });
        flagBtnList[6].onClick.AddListener(delegate() { gci.SetFlag(6); UpdateFlag(6); });
        flagBtnList[7].onClick.AddListener(delegate() { gci.SetFlag(7); UpdateFlag(7); });

        leaderBtnList[0].onClick.AddListener(delegate() { gci.SetLeaderHeroType(0); });
        leaderBtnList[1].onClick.AddListener(delegate() { gci.SetLeaderHeroType(1); });
        leaderBtnList[2].onClick.AddListener(delegate() { gci.SetLeaderHeroType(2); });
        leaderBtnList[3].onClick.AddListener(delegate() { gci.SetLeaderHeroType(3); });
        leaderBtnList[4].onClick.AddListener(delegate() { gci.SetLeaderHeroType(4); });
        leaderBtnList[5].onClick.AddListener(delegate() { gci.SetLeaderHeroType(5); });

        leaderManBtn.onClick.AddListener(delegate() { gci.SetLeaderHeroSex(0); });
        leaderWomanBtn.onClick.AddListener(delegate() { gci.SetLeaderHeroSex(1); });

        menberBtnList[0].onClick.AddListener(delegate() { gci.RollMenber(0); });
        menberBtnList[1].onClick.AddListener(delegate() { gci.RollMenber(1); });
        menberBtnList[2].onClick.AddListener(delegate() { gci.RollMenber(2); });
        menberBtnList[3].onClick.AddListener(delegate() { gci.RollMenber(3); });
        menberBtnList[4].onClick.AddListener(delegate() { gci.RollMenber(4); });


        menberAllBtn.onClick.AddListener(delegate() { gci.RollMenberAll(); });

        confirmBtn.onClick.AddListener(delegate() { gci.ConfirmAndStart(); });
    }
Beispiel #2
0
    //随从设置栏目-更新
    public void UpdateMenberInfo(int index)
    {
        gci = GameObject.Find("GameManagerInScene").GetComponent <GameControlInNewGame>();

        picImageList[index].overrideSprite = Resources.Load("Image/RolePic/" + gci.temp_HeroList[index].pic + "/Pic", typeof(Sprite)) as Sprite;
        nameTextList[index].text           = gci.temp_HeroList[index].name;
        typeTextList[index].text           = "<color=#" + DataManager.mHeroDict[gci.temp_HeroList[index].prototypeID].Color + ">" + DataManager.mHeroDict[gci.temp_HeroList[index].prototypeID].Name + "</color>";
    }
Beispiel #3
0
    //主角设置栏目-更新
    public void UpdateLeaderInfo(int index)
    {
        gci = GameObject.Find("GameManagerInScene").GetComponent <GameControlInNewGame>();
        if (gci.temp_Leader.sex == 0)
        {
            leaderManImage.color   = new Color(1f, 1f, 1f, 1f);
            leaderWomanImage.color = new Color(1f, 1f, 1f, 0.5f);
        }
        else
        {
            leaderManImage.color   = new Color(1f, 1f, 1f, 0.5f);
            leaderWomanImage.color = new Color(1f, 1f, 1f, 1f);
        }

        for (int i = 0; i < 6; i++)
        {
            leaderTypeImageList[i].color = new Color(1f, 1f, 1f, 0.5f);
            leaderTypeTextList[i].color  = new Color(leaderTypeTextList[i].color.r, leaderTypeTextList[i].color.g, leaderTypeTextList[i].color.b, 0.5f);
        }
        leaderTypeImageList[index].color = new Color(1f, 1f, 1f, 1f);
        leaderTypeTextList[index].color  = new Color(leaderTypeTextList[index].color.r, leaderTypeTextList[index].color.g, leaderTypeTextList[index].color.b, 1f);

        //Debug.Log(leaderTypeImageList[3].color);
    }
Beispiel #4
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (labelType == LabelType.NewGameHero)
     {
         GameControlInNewGame gci = GameObject.Find("GameManagerInScene").GetComponent <GameControlInNewGame>();
         HeroPanel.Instance.OnShow(gci.temp_HeroList[index], false, 374, -32);
     }
     else if (labelType == LabelType.NewGameLeader)
     {
         GameControlInNewGame gci = GameObject.Find("GameManagerInScene").GetComponent <GameControlInNewGame>();
         HeroPanel.Instance.OnShow(gci.temp_Leader, false, 374, -32);
     }
     else if (labelType == LabelType.Item)
     {
         ItemListAndInfoPanel.Instance.UpdateInfo(gc.itemDic[index]);
     }
     else if (labelType == LabelType.Consumable)
     {
         ConsumableListAndInfoPanel.Instance.UpdateInfo(index);
     }
     else if (labelType == LabelType.HeroInSelect)
     {
         HeroPanel.Instance.OnShow(gc.heroDic[index], false, (int)(BuildingPanel.Instance.gameObject.GetComponent <RectTransform>().anchoredPosition.x + BuildingPanel.Instance.gameObject.GetComponent <RectTransform>().sizeDelta.x + GameControl.spacing),
                                   (int)BuildingPanel.Instance.gameObject.GetComponent <RectTransform>().anchoredPosition.y);
     }
     else if (labelType == LabelType.HeroInSelectToCheck)
     {
         HeroPanel.Instance.OnShow(gc.heroDic[index], false, (int)(HeroSelectPanel.Instance.GetComponent <RectTransform>().anchoredPosition.x + HeroSelectPanel.Instance.GetComponent <RectTransform>().sizeDelta.x + GameControl.spacing), (int)(HeroSelectPanel.Instance.GetComponent <RectTransform>().anchoredPosition.y));
     }
     else if (labelType == LabelType.EquipmentLook)
     {
         if (index != -1)
         {
             ItemListAndInfoPanel.Instance.OnShow(index, (int)(HeroPanel.Instance.gameObject.GetComponent <RectTransform>().anchoredPosition.x + HeroPanel.Instance.gameObject.GetComponent <RectTransform>().sizeDelta.x + GameControl.spacing),
                                                  (int)HeroPanel.Instance.gameObject.GetComponent <RectTransform>().anchoredPosition.y);
         }
     }
     else if (labelType == LabelType.BuildingStrengthen)
     {
         if (index != -1)
         {
             if (!ItemListAndInfoPanel.Instance.isChooseTarget)
             {
                 ItemListAndInfoPanel.Instance.OnShow(index, 1178, -104);
             }
         }
     }
     else if (labelType == LabelType.BuildingInlay)
     {
         if (index != -1)
         {
             if (!ItemListAndInfoPanel.Instance.isChooseTarget)
             {
                 ItemListAndInfoPanel.Instance.OnShow(index, 1178, -104);
             }
         }
     }
     else if (labelType == LabelType.HeroIcon)
     {
         HeroPanel.Instance.ShowIconInfo(iconType, heroID, index, GetComponent <RectTransform>().anchoredPosition.x + 56f);
     }
     else if (labelType == LabelType.GetsInAdventure)
     {
         AdventureMainPanel.Instance.ShowGetsIconInfo((byte)heroID, GetComponent <RectTransform>().anchoredPosition.x, iconType, index);
     }
 }