예제 #1
0
    /// <summary>
    /// 修改队名回调
    /// </summary>
    /// <param name="obj"></param>
    void OnRecChangeTeamName(object obj)
    {
        CardTeamInfo info = (CardTeamInfo)obj;

        if (HeroTeamMediator.heroTeamMediator != null && HeroTeamMediator.heroTeamMediator.heroListMsg.id == info.id)
        {
            HeroTeamMediator.heroTeamMediator.panel.teamName.text  = info.name;
            HeroTeamMediator.heroTeamMediator.heroListMsg.teamName = info.name;
        }
    }
예제 #2
0
 private void OnClick(GameObject go)
 {
     if (go == commonBtn.gameObject)
     {
         CardTeamInfo info = new CardTeamInfo
         {
             id   = HeroTeamMediator.heroTeamMediator.heroListMsg.id,
             name = heroTeamName.label.text,
         };
         NSocket.GetInstance().SendData(Request.ChangeTeamName, info);
         Main.blurCamera.gameObject.SetActive(false);
         Main.CameraUI.GetComponent <Blur>().enabled = false;
         MonoBehaviour.DestroyImmediate(this.gameObject);
     }
     else if (go == cancelBtn.gameObject)
     {
         Main.blurCamera.gameObject.SetActive(true);
         Main.CameraUI.GetComponent <Blur>().enabled = false;
         MonoBehaviour.DestroyImmediate(this.gameObject);
     }
 }