Пример #1
0
 void Buttonwhich(int buttonid)
 {
     if (buttonid == 2)
     {
         ArkCrossEngine.ItemLevelupConfig iluc = ArkCrossEngine.ItemLevelupConfigProvider.Instance.GetDataById(level);
         ArkCrossEngine.RoleInfo          ri   = ArkCrossEngine.LobbyClient.Instance.CurrentRole;
         if (iluc != null && ri != null)
         {
             int costmoney = iluc.m_PartsList.Count > position ? iluc.m_PartsList[position] : 0;
             int needmoney = costmoney - (int)(ri.Money);
             if (needmoney > 0)
             {
                 float needgold = needmoney * (iluc.m_Rate == float.Epsilon ? 1 : iluc.m_Rate);
                 if (needgold > ri.Gold)
                 {
                     ArkCrossEngine.MyAction <int> fun = Buttonwhichone;
                     ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(123), "YES", null, null, fun, false);
                 }
                 else
                 {
                     ArkCrossEngine.LogicSystem.PublishLogicEvent("ge_upgrade_item", "lobby", position, ID, true);
                 }
             }
         }
     }
 }
Пример #2
0
    public void OnResetButton()
    {
        RoleInfo role_info = LobbyClient.Instance.CurrentRole;

        if (null != role_info)
        {
            UserInfo user = role_info.GetPlayerSelfInfo();
            if (null != user)
            {
                ExpeditionPlayerInfo e = role_info.GetExpeditionInfo();
                if (null != e)
                {
                    if (e.Schedule > 0)
                    {
                        CharacterProperty property = user.GetActualProperty();
                        GfxSystem.EventChannelForLogic.Publish("ge_expedition_reset", "lobby", 1000, 1000, 0, 0, true, false);
                    }
                    else
                    {
                        ArkCrossEngine.MyAction <int> Func = HandleDialog;
                        string CHN_CONFIRM = StrDictionaryProvider.Instance.GetDictString(4); //确定
                        string CHN_CANCEL  = StrDictionaryProvider.Instance.GetDictString(9); //取消
                        string CHN_DESC    = StrDictionaryProvider.Instance.GetDictString(460);
                        LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", CHN_DESC, null, CHN_CONFIRM, CHN_CANCEL, Func, false);
                    }
                }
            }
        }
    }
Пример #3
0
    public void SwitchID()
    {
        UIManager.Instance.HideWindowByName("Option");

        ArkCrossEngine.MyAction <int> fun = SwitchIDButtonWhich;
        ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(17), null,
                                                              ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(157), fun, false);
    }
Пример #4
0
    /*发送对话框*/
    void SendDialog(int i_chn_desc, int i_confirm, int i_cancel, ArkCrossEngine.MyAction <int> Func, params object[] insert_name)
    {
        string chn_desc = "";
        string confirm  = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(i_confirm);
        string cancel   = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(i_cancel);

        chn_desc = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(i_chn_desc);
        string str = chn_desc;

        if (insert_name != null)
        {
            str = string.Format(chn_desc, insert_name);
        }
        ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", str, null, confirm, cancel, Func, false);
    }
Пример #5
0
 public void ItemUpdate()
 {
     ArkCrossEngine.ItemLevelupConfig iluc = ArkCrossEngine.ItemLevelupConfigProvider.Instance.GetDataById(level);
     ArkCrossEngine.RoleInfo          ri   = ArkCrossEngine.LobbyClient.Instance.CurrentRole;
     if (iluc != null && ri != null)
     {
         int costmoney = iluc.m_PartsList.Count > position ? iluc.m_PartsList[position] : 0;
         if (costmoney > ri.Money)
         {
             ArkCrossEngine.MyAction <int> fun = Buttonwhich;
             ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(122),
                                                                   ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null /*fun*/, false);
         }
         else
         {
             ArkCrossEngine.LogicSystem.PublishLogicEvent("ge_upgrade_item", "lobby", position, ID, false);
         }
     }
 }
Пример #6
0
    /*friendItem发过来的 删除好友*/
    void ClickDelete(UnityEngine.GameObject item)
    {
        try
        {
            foreach (UnityEngine.GameObject go in friendDic.Keys)
            {
                if (go == item)
                {
                    ArkCrossEngine.MyAction <int> Func = HandleDialog;
                    currentDeleteFriend = go;

                    string chn_desc = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(559);
                    string cancel   = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(9);
                    string confirm  = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(4);
                    ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", chn_desc, null, cancel, confirm, Func, false);
                }
            }
        }
        catch (Exception ex)
        {
            ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
        }
    }
Пример #7
0
    public void OnClickStart()
    {
        if (CheckMatchingOther())
        {//正在匹配其他
            return;
        }

        if (isMatching == true)
        {
            ShowTip(ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(868));//匹配中
        }
        else
        {
            RoleInfo  role  = LobbyClient.Instance.CurrentRole;
            GroupInfo group = role.Group;
            if (group.Count < GroupInfo.c_MemberNumMax)
            {//组队未满
             //提示单人进入?
                ArkCrossEngine.MyAction <int> Func = SendStart;
                ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(854), null,
                                                                      ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(855),
                                                                      ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(9), Func, false);
            }
            else
            {     //有组队
                if (group.CreatorGuid == role.Guid)
                { //自己是队长
                    LogicSystem.PublishLogicEvent("ge_start_mpve", "lobby", sceneId);
                }
                else
                {                            //其他人队长
                    SendScreeTipCenter(853); //提示 你不是队长
                }
            }
        }
    }
Пример #8
0
 public void RequestRefresh()
 {
     ArkCrossEngine.MyAction <int> fun = Yes;
     ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.Format(1006, (refreshNum + 1) * 50), null,
                                                           ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(157), fun, false);
 }
Пример #9
0
 public int vigor = 0;                                                                 //角色当前的体力
 private void HandleDialogMsg(string message, string button0, string button1, string button2, ArkCrossEngine.MyAction <int> dofunction, bool islogic)
 {
     UIManager.Instance.ShowWindowByName("Dialog");
     UnityEngine.GameObject go = UIManager.Instance.GetWindowGoByName("Dialog");
     if (go != null)
     {
         Dialog dialogScript = go.GetComponent <Dialog>();
         if (dialogScript != null)
         {
             dialogScript.ManageDialog(message, button0, button1, button2, dofunction, islogic);
         }
     }
 }