Пример #1
0
        public DataDictionaryMgr <SoundLogicData> soundLogicDataMgr;   // 声音数据容器

        private SkillConfigProvider()
        {
            skillLogicDataMgr  = new DataDictionaryMgr <SkillLogicData>();
            impactLogicDataMgr = new DataDictionaryMgr <ImpactLogicData>();
            effectLogicDataMgr = new DataDictionaryMgr <EffectLogicData>();
            soundLogicDataMgr  = new DataDictionaryMgr <SoundLogicData>();
        }
Пример #2
0
        public void PreLoadSceneNpcSkills(int sceneid)
        {
            MapDataProvider mdp = SceneConfigProvider.Instance.GetMapDataBySceneResId(sceneid);

            if (mdp != null)
            {
                DataDictionaryMgr <Data_Unit> ddm = mdp.m_UnitMgr;
                if (ddm != null)
                {
                    MyDictionary <int, object> dataDic = ddm.GetData();
                    if (dataDic != null)
                    {
                        List <int> linkidlist = new List <int>();
                        linkidlist.Clear();
                        List <int> skilllist = new List <int>();
                        skilllist.Clear();
                        foreach (object obj in dataDic.Values)
                        {
                            Data_Unit du = obj as Data_Unit;
                            if (du != null)
                            {
                                if (!linkidlist.Contains(du.m_LinkId))
                                {
                                    linkidlist.Add(du.m_LinkId);
                                }
                            }
                        }
                        foreach (int linkid in linkidlist)
                        {
                            Data_NpcConfig dnc = NpcConfigProvider.Instance.GetNpcConfigById(linkid);
                            if (dnc != null && dnc.m_SkillList != null)
                            {
                                foreach (int skillid in dnc.m_SkillList)
                                {
                                    if (!skilllist.Contains(skillid))
                                    {
                                        skilllist.Add(skillid);
                                    }
                                }
                            }
                        }
                        foreach (int skillid in skilllist)
                        {
                            PreloadNewSkillInstance(skillid);
                        }
                    }
                }
            }
        }
Пример #3
0
    void ManageExchangeGoods(int currency, bool refresh, ArkCrossEngine.Network.GeneralOperationResult result, int exchangeid, int exchangenum)
    {
        try
        {
            GfxSystem.PublishGfxEvent("ge_ui_connect_hint", "ui", false, false);
            if (currency != currencyId && currency != 0)
            {
                return;
            }
            if (refresh)
            {
                if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed)
                {
                    DataDictionaryMgr <StoreConfig> storedata = ArkCrossEngine.StoreConfigProvider.Instance.StoreDictionaryMgr;
                    if (storedata != null)
                    {
                        MyDictionary <int, object> storedic = storedata.GetData();
                        if (storedic != null)
                        {
                            StoreConfig sc = null;
                            foreach (KeyValuePair <int, object> pair in storedic)
                            {
                                sc = pair.Value as StoreConfig;
                                if (sc != null)
                                {
                                    if (sc.m_Currency == currencyId || (currency == 0 && sc.m_Currency == currencyId))
                                    {
                                        AddItem(pair.Key, 0);
                                    }
                                }
                            }
                        }
                    }
                }
                else if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_CostError)
                {
                    ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(123),
                                                                          ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null, false);
                }
            }
            else
            {
                if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed)
                {
                    AddItem(exchangeid, exchangenum);
                    ArkCrossEngine.StoreConfig sc = ArkCrossEngine.StoreConfigProvider.Instance.GetDataById(exchangeid);
                    if (sc != null)
                    {
                        ArkCrossEngine.ItemConfig ic = ArkCrossEngine.ItemConfigProvider.Instance.GetDataById(sc.m_ItemId);
                        if (ic != null)
                        {
                            GfxSystem.PublishGfxEvent("ge_screen_tip", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(1005)
                                                      + ic.m_ItemName + "X" + sc.m_ItemNum, UIScreenTipPosEnum.AlignCenter, UnityEngine.Vector3.zero);
                        }
                    }
                }
                else
                {
                    //提示
                    int sign = 1003;
                    switch (result)
                    {
                    case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_CostError:
                        sign = 1000;
                        break;

                    case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_Overflow:
                        sign = 1001;
                        break;

                    case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_LevelError:
                        sign = 1002;
                        break;

                    default:
                        sign = 1003;
                        break;
                    }
                    GfxSystem.PublishGfxEvent("ge_screen_tip", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(sign), UIScreenTipPosEnum.AlignCenter, UnityEngine.Vector3.zero);
                }
            }
            UIGrid ug = gridGo.GetComponent <UIGrid>();
            if (ug != null)
            {
                ug.repositionNow = true;
            }
        }
        catch (Exception ex)
        {
            ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
        }
    }
Пример #4
0
 /**
  * @brief 构造函数
  */
 public MapDataProvider()
 {
     m_UnitMgr       = new DataDictionaryMgr <Data_Unit>();
     m_SceneLogicMgr = new DataDictionaryMgr <SceneLogicConfig>();
 }