void GuardInitMyData()
 {
     if (m_typeList.Count == 0)
     {
         m_typeList.Add(typeof(UnityEngine.Collider));
     }
     if (m_heroTabel == null)
     {
         TextAsset asset = GameData.LoadConfig <TextAsset>("HeroInfoTable");
         m_heroTabel = new HeroInfoTable();
         m_heroTabel.Load(asset.bytes);
         m_nameList.Clear();
         m_idList.Clear();
         foreach (var item in m_heroTabel.m_list.Values)
         {
             m_nameList.Add(item.ID + "-" + item.StrName);
             m_idList.Add(item.ID);
         }
     }
     if (m_npcTabel == null)
     {
         TextAsset asset = GameData.LoadConfig <TextAsset>("NPCInfoTable");
         m_npcTabel = new NPCInfoTable();
         m_npcTabel.Load(asset.bytes);
     }
     if (m_modelTable == null)
     {
         TextAsset obj = GameData.LoadConfig <TextAsset>("ModelInfoTable");
         m_modelTable = new ModelInfoTable();
         m_modelTable.Load(obj.bytes);
     }
     if (m_weaponTable == null)
     {
         TextAsset obj = GameData.LoadConfig <TextAsset>("WeaponInfoTable");
         m_weaponTable = new WeaponInfoTable();
         m_weaponTable.Load(obj.bytes);
     }
     if (m_skillTable == null)
     {
         TextAsset obj = GameData.LoadConfig <TextAsset>("SkillTable");
         m_skillTable = new SkillTable();
         m_skillTable.Load(obj.bytes);
     }
 }
    void OnGUI()
    {
        Repaint();
        GuardInitMyData();
        //EditorGUILayout.LabelField("", GUILayout.Width(0));
        int tableIndex = EditorGUILayout.Popup(@"卡牌表分类:", m_tableIndex, new string[] { "Hero", "NPC" });

        if (tableIndex != m_tableIndex)
        {
            AssetDatabase.SaveAssets();
            Delete();

            m_index = 0;

            m_tableIndex = tableIndex;
            m_nameList.Clear();
            m_idList.Clear();
            if (m_tableIndex == 0)
            {
                foreach (var item in m_heroTabel.m_list.Values)
                {
                    m_nameList.Add(item.ID + "-" + item.StrName);
                    m_idList.Add(item.ID);
                }
            }
            else
            {
                foreach (var item in m_npcTabel.m_list.Values)
                {
                    m_nameList.Add(item.ID + "-" + item.StrName);
                    m_idList.Add(item.ID);
                }
            }
        }
        //EditorGUILayout.LabelField("", GUILayout.Width(0));
        m_index = EditorGUILayout.Popup(@"卡牌名称:", m_index, m_nameList.ToArray());
        //EditorGUILayout.LabelField("", GUILayout.Width(0));
        int id = EditorGUILayout.IntField(LABEL_HERO_ID, m_idList[m_index]);

        if (id != m_idList[m_index])
        {
            if (m_idList.Contains(id))
            {
                m_index = m_idList.FindIndex(item => item == id);
            }
        }
        //EditorGUILayout.LabelField("", GUILayout.Width(0));

        //////////////////////////////////////////////////////////////////////////
        #region//播放相关
        int oldAniIndex = m_playingAniIndex;
        m_playingAniIndex = EditorGUILayout.Popup(@"动画:", oldAniIndex, m_loadedAnimationList.ToArray());
        //m_copyIndex = EditorGUILayout.Popup(@"copy来源的卡牌名称:", m_copyIndex, m_nameList.ToArray());
        if (oldAniIndex != m_playingAniIndex)
        {
            PlaySkill(m_playingAniIndex);
        }
        Rect rct = new Rect(0, 100, 100, 100);
        GUI.Label(rct, @"动画播放相关:");
        rct = new Rect(150, 100, 100, 30);
        if (GUI.Button(rct, @"Play"))
        {
            PlaySkill(m_playingAniIndex);
        }
        rct = new Rect(260, 100, 100, 30);
        if (GUI.Button(rct, @"FixCamera"))
        {
            FixSceneCamera();
        }
        rct = new Rect(370, 100, 100, 30);
        if (GUI.Button(rct, @"Next"))
        {
            NextDeltaTime();
        }
        rct = new Rect(480, 100, 100, 30);
        if (GUI.Button(rct, @"PlaySelections"))
        {
            PlaySelectionsEffect();
        }
        rct = new Rect(590, 100, 100, 30);
        if (GUI.Button(rct, @"Pause/Resume"))
        {
            if (Time.timeScale < 0.01)
            {
                Time.timeScale = 1.0f;
            }
            else
            {
                Time.timeScale = 0.0f;
            }
        }
        #endregion
        //////////////////////////////////////////////////////////////////////////
        #region//卡牌编辑相关
        rct = new Rect(0, 140, 100, 100);
        GUI.Label(rct, @"卡牌编辑相关:");
        rct = new Rect(150, 140, 100, 30);
        if (GUI.Button(rct, @"Open"))
        {
            AssetDatabase.SaveAssets();
            Open();
            AssetDatabase.SaveAssets();
        }
        rct = new Rect(260, 140, 100, 30);
        if (GUI.Button(rct, @"Save"))
        {
            AssetDatabase.SaveAssets();
            Save();
            AssetDatabase.SaveAssets();
        }
        rct = new Rect(370, 140, 100, 30);
        if (GUI.Button(rct, @"Delete"))
        {
            AssetDatabase.SaveAssets();
            Delete();
            AssetDatabase.SaveAssets();
        }
        //rct = new Rect(480, 140, 100, 30);
        //if (GUI.Button(rct, @"Convert"))
        //{//转换所有animation
        //    AssetDatabase.SaveAssets();
        //    Convert();
        //    AssetDatabase.SaveAssets();
        //}
        //rct = new Rect(590, 140, 100, 30);
        //if (GUI.Button(rct, @"Save All"))
        //{
        //    AssetDatabase.SaveAssets();
        //    SaveAll();
        //    AssetDatabase.SaveAssets();
        //}
        #endregion
        //////////////////////////////////////////////////////////////////////////
        #region//读表相关
        rct = new Rect(0, 180, 100, 100);
        GUI.Label(rct, @"重新读表相关:");
        rct = new Rect(150, 180, 100, 30);
        if (GUI.Button(rct, @"Hero Table"))
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("HeroInfoTable");
            m_heroTabel.Load(asset.bytes);
            if (m_tableIndex == 0)
            {
                m_nameList.Clear();
                m_idList.Clear();
                foreach (var item in m_heroTabel.m_list.Values)
                {
                    m_nameList.Add(item.ID + "-" + item.StrName);
                    m_idList.Add(item.ID);
                }
            }
        }
        rct = new Rect(260, 180, 100, 30);
        if (GUI.Button(rct, @"NPC Table"))
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("NPCInfoTable");
            m_npcTabel.Load(asset.bytes);
            if (m_tableIndex == 1)
            {
                m_nameList.Clear();
                m_idList.Clear();
                foreach (var item in m_npcTabel.m_list.Values)
                {
                    m_nameList.Add(item.ID + "-" + item.StrName);
                    m_idList.Add(item.ID);
                }
            }
        }
        rct = new Rect(370, 180, 100, 30);
        if (GUI.Button(rct, @"Model Table"))
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("ModelInfoTable");
            m_modelTable.Load(obj.bytes);
        }
        rct = new Rect(480, 180, 100, 30);
        if (GUI.Button(rct, @"Weapon Table"))
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("WeaponInfoTable");
            m_weaponTable.Load(obj.bytes);
        }
        rct = new Rect(590, 180, 100, 30);
        if (GUI.Button(rct, @"Skill Table"))
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("SkillTable");
            m_skillTable.Load(obj.bytes);
        }
        #endregion
    }
Example #3
0
    static public void LoadTable()
    {
        if (null == QTESequenceTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("QTESequenceTable");
            QTESequenceTableAsset = new QTESequenceTable();
            QTESequenceTableAsset.Load(asset.bytes);
        }
        if (null == FlyingItemTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("FlyingObjBehaviorTable");
            FlyingItemTableAsset = new FlyingItemTable();
            FlyingItemTableAsset.Load(asset.bytes);
        }
        if (null == StageTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("StageTable");
            StageTableAsset = new StageTable();
            StageTableAsset.Load(asset.bytes);
        }
        if (null == RoomAttrTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("RoomAttrTable");
            RoomAttrTableAsset = new RoomAttrTable();
            RoomAttrTableAsset.Load(asset.bytes);
        }
        if (null == SkillTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("SkillTable");
            SkillTableAsset = new SkillTable();
            SkillTableAsset.Load(asset.bytes);
        }
        if (null == VocationTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("VocationTable");
            VocationTableAsset = new VocationTable();
            VocationTableAsset.Load(asset.bytes);
        }
        if (null == NPCInfoTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("NPCInfoTable");
            NPCInfoTableAsset = new NPCInfoTable();
            NPCInfoTableAsset.Load(asset.bytes);
        }
        if (null == TrapInfoTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("TrapInfoTable");
            TrapInfoTableAsset = new TrapInfoTable();
            TrapInfoTableAsset.Load(asset.bytes);
        }

        if (null == HeroInfoTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("HeroInfoTable");
            HeroInfoTableAsset = new HeroInfoTable();
            HeroInfoTableAsset.Load(asset.bytes);
        }
        //if (null == AnimWeightTableAsset)
        //{
        //    TextAsset asset = GameData.LoadConfig<TextAsset>("AnimWeight");
        //    AnimWeightTableAsset = new AnimWeightTable();
        //    AnimWeightTableAsset.Load(asset.bytes);
        //}
        if (null == SceneInfoTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("SceneInfoTable");
            SceneInfoTableAsset = new SceneInfoTable();
            SceneInfoTableAsset.Load(asset.bytes);
        }
        //if (null == DungeonInfoTableAsset)
        //{
        //    TextAsset asset = GameData.LoadConfig<TextAsset>("DungeonInfoTable");
        //    DungeonInfoTableAsset = new DungeonInfoTable();
        //    DungeonInfoTableAsset.Load(asset.bytes);
        //}
        if (null == SkillResultTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("SkillResultTable");
            SkillResultTableAsset = new SkillResultTable();
            SkillResultTableAsset.Load(asset.bytes);
        }
        if (null == AnimationTownAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("AnimationTown");
            AnimationTownAsset = new AnimationTable();
            AnimationTownAsset.Load(asset.bytes);
        }
        if (null == AnimationFightAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("AnimationFight");
            AnimationFightAsset = new AnimationTable();
            AnimationFightAsset.Load(asset.bytes);
        }
        AnimationTableAsset = AnimationFightAsset;
        if (null == ActionRelationTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("ActionRelation");
            ActionRelationTableAsset = new ActionRelationTable();
            ActionRelationTableAsset.Load(asset.bytes);
        }
        if (null == EquipTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("EquipBaseData");
            EquipTableAsset = new EquipTable();
            EquipTableAsset.Load(obj.bytes);
        }
        if (null == ModelInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("ModelInfoTable");
            ModelInfoTableAsset = new ModelInfoTable();
            ModelInfoTableAsset.Load(obj.bytes);
        }
        if (null == WeaponInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("WeaponInfoTable");
            WeaponInfoTableAsset = new WeaponInfoTable();
            WeaponInfoTableAsset.Load(obj.bytes);
        }
        if (null == UILoadInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("UILoadInfoTable");
            UILoadInfoTableAsset = new UILoadInfoTable();
            UILoadInfoTableAsset.Load(obj.bytes);
        }
        if (null == IconTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("IconTable");
            IconTableAsset = new IconTable();
            IconTableAsset.Load(obj.bytes);
        }
        if (null == BuffTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Buff");
            BuffTableAsset = new BuffTable();
            BuffTableAsset.Load(obj.bytes);
        }
        if (null == BuffRelationTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("BuffReplaceRelation");
            BuffRelationTableAsset = new BuffRelationTable();
            BuffRelationTableAsset.Load(obj.bytes);
        }
        if (null == BuffEffectTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("BuffEffect");
            BuffEffectTableAsset = new BuffEffectTable();
            BuffEffectTableAsset.Load(obj.bytes);
        }
        //if (null == CheckInfoTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("Checkinfo");
        //    CheckInfoTableAsset = new CheckInfoTable();
        //    CheckInfoTableAsset.Load(obj.bytes);
        //}
        //if (null == NpcSayTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("NpcSay");
        //    NpcSayTableAsset = new NpcSayTable();
        //    NpcSayTableAsset.Load(obj.bytes);
        //}

        //if (null == ShopTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("NpcShop");
        //    ShopTableAsset = new ShopTable();
        //    ShopTableAsset.Load(obj.bytes);
        //}

        if (null == MissionTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Task");
            MissionTableAsset = new MissionTable();
            MissionTableAsset.Load(obj.bytes);
        }

        if (null == AptitudeTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Aptitude");
            AptitudeTableAsset = new AptitudeTable();
            AptitudeTableAsset.Load(obj.bytes);
        }

        if (null == StringTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("StringTable");
            StringTableAsset = new StringTable();
            StringTableAsset.Load(obj.bytes);
        }


        if (null == WorldParamTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("WorldParamTable");
            WorldParamTableAsset = new WorldParamTable();
            WorldParamTableAsset.Load(obj.bytes);
        }
        if (null == CDTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("CDTable");
            CDTableAsset = new CDTable();
            CDTableAsset.Load(obj.bytes);
        }
        //if (null == ServerTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("Servers");
        //    ServerTableAsset = new ServerTable();
        //    ServerTableAsset.Load(obj.bytes);
        //}
        //if (null == SceneMapNumericTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("Coordinate");
        //    SceneMapNumericTableAsset = new SceneMapNumericTable();
        //    SceneMapNumericTableAsset.Load(obj.bytes);
        //}
        //if (null == EquipExpMoneyTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("EquipExpMoney");
        //    EquipExpMoneyTableAsset = new EquipExpMoneyTable();
        //    EquipExpMoneyTableAsset.Load(obj.bytes);
        //}
        //if (null == ShakeTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("Shake");
        //    ShakeTableAsset = new ShakeTable();
        //    ShakeTableAsset.Load(obj.bytes);
        //}
        //if (null == PlayerGuideTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("PlayerGuide");
        //    PlayerGuideTableAsset = new PlayerGuideTable();
        //    PlayerGuideTableAsset.Load(obj.bytes);
        //}
        //if (null == IllumeTableAsset)
        //{
        //     TextAsset obj = GameData.LoadConfig<TextAsset>("Illume");
        //     IllumeTableAsset = new IllumeTable();
        //     IllumeTableAsset.Load(obj.bytes);
        //}
        //if (null == BossTableAsset)
        //{
        //     TextAsset obj = GameData.LoadConfig<TextAsset>("BOSS");
        //     BossTableAsset = new BossTable();
        //     BossTableAsset.Load(obj.bytes);
        //}
        //if (null == SandTableInfoTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("SandTableInfoTable");
        //     SandTableInfoTableAsset = new SandTableInfoTable();
        //     SandTableInfoTableAsset.Load(obj.bytes);
        //}

        if (null == LevelUpTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("LvUpExp");
            LevelUpTableAsset = new LevelUpTable();
            LevelUpTableAsset.Load(obj.bytes);
        }

        //if (null == DungeonEventTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("DungeonEvent");
        //    DungeonEventTableAsset = new DungeonEventTable();
        //    DungeonEventTableAsset.Load(obj.bytes);
        //}

        //if (null == DungeonEventResultTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("DungeonEventResult");
        //    DungeonEventResultTableAsset = new DungeonEventResultTable();
        //    DungeonEventResultTableAsset.Load(obj.bytes);
        //}

        //if (null == DungeonFilesAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("DungeonFiles");
        //    DungeonFilesAsset = new DungeonFiles();
        //    DungeonFilesAsset.Load(obj.bytes);
        //}
        if (null == RarityRelativeAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("RarityRelative");
            RarityRelativeAsset = new RarityRelativeTable();
            RarityRelativeAsset.Load(obj.bytes);
        }
        if (null == OccupationInfoAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("OccupationInfoTable");
            OccupationInfoAsset = new OccupationInfoTable();
            OccupationInfoAsset.Load(obj.bytes);
        }

        if (null == PlayerRandomNameAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("PlayerRandomName");
            PlayerRandomNameAsset = new PlayerRandomNameTable();
            PlayerRandomNameAsset.Load(obj.bytes);
        }

        if (null == ZoneInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("ZoneInfo");
            ZoneInfoTableAsset = new ZoneInfoTable();
            ZoneInfoTableAsset.Load(obj.bytes);
        }

        if (null == StageInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("StageInfo");
            StageInfoTableAsset = new StageInfoTable();
            StageInfoTableAsset.Load(obj.bytes);
        }

        if (null == FloorInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("FloorInfo");
            FloorInfoTableAsset = new FloorInfoTable();
            FloorInfoTableAsset.Load(obj.bytes);
        }

        if (null == ItemTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Item");
            ItemTableAsset = new ItemTable();
            ItemTableAsset.Load(obj.bytes);
        }

        if (null == floorRankTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("FloorRankTable");
            floorRankTableAsset = new FloorRankTable();
            floorRankTableAsset.Load(obj.bytes);
        }

        if (null == ScoreParamTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("ScoreParamTable");
            ScoreParamTableAsset = new ScoreParamTable();
            ScoreParamTableAsset.Load(obj.bytes);
        }

        if (null == BagTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("BagTable");
            BagTableAsset = new BagTable();
            BagTableAsset.Load(obj.bytes);
        }

        if (null == RaceInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("RaceInfoTable");
            RaceInfoTableAsset = new RaceInfoTable();
            RaceInfoTableAsset.Load(obj.bytes);
        }

        if (null == EquipmentTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Equipment");
            EquipmentTableAsset = new EquipmentTable();
            EquipmentTableAsset.Load(obj.bytes);
        }

        if (null == playerAttrTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("PlayerAttrTable");
            playerAttrTableAsset = new PlayerAttrTable();
            playerAttrTableAsset.Load(obj.bytes);
        }
        if (null == loadingTipsAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("LoadingTips");
            loadingTipsAsset = new LoadingTipsTable();
            loadingTipsAsset.Load(obj.bytes);
        }

        if (null == MagicStoneTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("MagicStonePrice");
            MagicStoneTableAsset = new MagicStoneTable();
            MagicStoneTableAsset.Load(obj.bytes);
        }

        if (null == RingExchangeTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("RingExchangeTable");
            RingExchangeTableAsset = new RingExchangeTable();
            RingExchangeTableAsset.Load(obj.bytes);
        }

//         if (null == SceneRoomTableAsset)
//         {
//             TextAsset obj = GameData.LoadConfig<TextAsset>("SceneRoomTable");
//             SceneRoomTableAsset = new SceneRoomTable();
//             SceneRoomTableAsset.Load(obj.bytes);
//         }
//         if (null == SceneBridgeTableAsset)
//         {
//             TextAsset obj = GameData.LoadConfig<TextAsset>("SceneBridgeTable");
//             SceneBridgeTableAsset = new SceneBridgeTable();
//             SceneBridgeTableAsset.Load(obj.bytes);
//         }
//         if (null == SceneGateTableAsset)
//         {
//             TextAsset obj = GameData.LoadConfig<TextAsset>("SceneGateTable");
//             SceneGateTableAsset = new SceneGateTable();
//             SceneGateTableAsset.Load(obj.bytes);
//         }
//         if (null == SceneTeleportTableAsset)
//         {
//             TextAsset obj = GameData.LoadConfig<TextAsset>("SceneTeleportTable");
//             SceneTeleportTableAsset = new SceneTeleportTable();
//             SceneTeleportTableAsset.Load(obj.bytes);
//         }
        if (null == MessageRespondTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("MessageRespondTable");
            MessageRespondTableAsset = new MessageRespondTable();
            MessageRespondTableAsset.Load(obj.bytes);
        }

        if (null == IconInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Icon");
            IconInfoTableAsset = new IconInfoTable();
            IconInfoTableAsset.Load(obj.bytes);
        }

        if (null == attrRatioTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("AttrRatioTable");
            attrRatioTableAsset = new AttrRatioTable();
            attrRatioTableAsset.Load(obj.bytes);
        }

        if (null == ComboSwordSoulAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("ComboSwordSoulTable");
            ComboSwordSoulAsset = new ComboSwordSoulTable();
            ComboSwordSoulAsset.Load(obj.bytes);
        }

        if (null == eventItemAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("EventItem");
            eventItemAsset = new EventItemTable();
            eventItemAsset.Load(obj.bytes);
        }

        if (null == gradeUpRequireAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("GradeUpRequireTable");
            gradeUpRequireAsset = new GradeUpRequireTable();
            gradeUpRequireAsset.Load(obj.bytes);
        }

        if (null == qualityRelativeAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("QualityRelativeTable");
            qualityRelativeAsset = new QualityRelativeTable();
            qualityRelativeAsset.Load(obj.bytes);
        }


        if (null == cardTypeVariationAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("CardTypeVariationTable");
            cardTypeVariationAsset = new CardTypeVariationTable();
            cardTypeVariationAsset.Load(obj.bytes);
        }

        if (null == cardLevelVariationAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("CardLevelupVariationTable");
            cardLevelVariationAsset = new CardLevelVariationTable();
            cardLevelVariationAsset.Load(obj.bytes);
        }

        if (null == yellowPointParamAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("YellowPointParam");
            yellowPointParamAsset = new YellowPointParamTable();
            yellowPointParamAsset.Load(obj.bytes);
        }
        //加载随机地图相关表数据
        LoadRandMapTableData();

        int id        = 70;
        int level     = 12;
        int yellow    = 3;
        int hp        = BattleFormula.GetHp(id, level, yellow);
        int phyAttack = BattleFormula.GetPhyAttack(id, level, yellow);
        int magAttack = BattleFormula.GetMagAttack(id, level, yellow);
        int magDefend = BattleFormula.GetMagDefend(id, level, yellow);
        int phyDEFEND = BattleFormula.GetPhyDefend(id, level, yellow);

        Debug.Log("magDefend:" + magDefend);
        Debug.Log("magAttack:" + magAttack);
        Debug.Log("phyDEFEND:" + phyDEFEND);
        Debug.Log("phyAttack:" + phyAttack);
        Debug.Log("hp:" + hp);
    }