提交 35f81fb3 编写于 作者: 威武堂堂's avatar 威武堂堂

表数据结构优化

上级 ef07474e
......@@ -12,7 +12,7 @@ namespace Excel2Lua
/// <summary>
/// Excel数组开始行数
/// </summary>
const int BGN_ROW = 5;
const int BGN_ROW = 3;
/// <summary>
/// 源字符组
......@@ -129,22 +129,18 @@ namespace Excel2Lua
stringBuilder.Append("local data = {\n");
for (int i = BGN_ROW; i <= GetSheetRows(sheet); i++)
{
string data = sheet.GetRow(i).GetCell(1).ToString().Trim();
if (!string.IsNullOrEmpty(data))
stringBuilder.AppendFormat("\t[{0}] = ", i - 2);
stringBuilder.Append("{");
for (int j = 1; j < GetSheetColonums(sheet); j++)
{
stringBuilder.AppendFormat("\t[{0}] = ", data);
stringBuilder.Append("{");
for (int j = 1; j < GetSheetColonums(sheet); j++)
string cellData = sheet.GetRow(i).GetCell(j).ToString().Trim();
if (!string.IsNullOrEmpty(cellData))
{
string cellData = sheet.GetRow(i).GetCell(j).ToString().Trim();
if (!string.IsNullOrEmpty(cellData))
{
cellData = ParseCellDataByType(filedMap[j], cellData);
stringBuilder.AppendFormat("[{0}]={1},", j, cellData);
}
cellData = ParseCellDataByType(filedMap[j], cellData);
stringBuilder.AppendFormat("[{0}]={1},", j, cellData);
}
stringBuilder.Append("},\n");
}
stringBuilder.Append("},\n");
}
stringBuilder.Append("}\n\n");
#endregion 转化内容
......
-- 常量管理
is_editor = UnityEngine.Application.isEditor
Protocal = {
Connect = '101'; --连接服务器
Exception = '102'; --异常掉线
......@@ -14,11 +12,6 @@ Protocal = {
-- LUA_NETWORK_RESEND_SUCCESSFULLY = "LUA_NETWORK_RESEND_SUCCESSFULLY",
-- }
-- LANGUAGE =
-- {
-- "zh",--中文
-- "en"--英文
-- }
const = const or {}
......
-- 输出日志--
function log(str)
if is_editor then
if Is_Editor then
local luaStackStr = debug.traceback(str, 0)
Util.Log(luaStackStr)
else
......@@ -10,7 +10,7 @@ function log(str)
end
function logGreen(str)
if is_editor then
if Is_Editor then
local luaStackStr = debug.traceback(str, 0)
Util.LogGreen(luaStackStr)
else
......@@ -19,7 +19,7 @@ function logGreen(str)
end
function LogYellow(str)
if is_editor then
if Is_Editor then
local luaStackStr = debug.traceback(str, 0)
Util.LogYellow(luaStackStr)
else
......@@ -28,7 +28,7 @@ function LogYellow(str)
end
function LogBlue(str)
if is_editor then
if Is_Editor then
local luaStackStr = debug.traceback(str, 0)
Util.LogBlue(luaStackStr)
else
......
--[[Notice: This lua config file is auto generate by Language.xlsx,don't modify it manually! --]]
local indexData = {
key = 1, --主键
zh = 2, --中文
des = 3, --中文描述
zh = 1, --中文
des = 2, --中文描述
}
local data = {
[3] = {[1]=3,[2]='擂台',[3]='使用擂台主自定义规则对战',},
[4] = {[1]=4,[2]='构筑',[3]='制作一张卡',},
[5] = {[1]=5,[2]='牌库',[3]='包含系统赠送和自定义卡牌和卡组',},
[1] = {[1]='剧情',[2]='技巧引导和背景故事',},
[2] = {[1]='排位',[2]='使用标准规则进行对战',},
[3] = {[1]='擂台',[2]='使用擂台主自定义规则对战',},
[4] = {[1]='构筑',[2]='制作一张卡',},
[5] = {[1]='牌库',[2]='包含系统赠送和自定义卡牌和卡组',},
}
local mt = {}
......
-- 入口脚本
Main = Main or {}
Is_Editor = UnityEngine.Application.isEditor
function Main.Init()
log("Lua Main.Init")
const:Init()
log("Lua Main.Init")
const:Init()
end
function Main.Start()
......
......@@ -2,18 +2,16 @@
MenuPanel = ViewBase:New("MenuPanel", true)
function MenuPanel:OnShow()
local Par_snow = self.binder:GetObj("Par_snow")
Par_snow:Play()
local Ani_box = self.binder:GetObj("Ani_box")
Ani_box:Play("UI3d_Box_chuxian")
self.binder:GetObj("Par_snow"):Play()
self.binder:GetObj("Ani_box"):Play("UI3d_Box_chuxian")
end
function MenuPanel:OnHide()
Par_snow:Stop()
self.binder:GetObj("Par_snow"):Stop()
end
function MenuPanel:OnClick_Btn_chess()
function MenuPanel:OnClick_Btn_rank()
self.binder:GetObj("Te_rank").text = ""
end
......@@ -5955,13 +5955,13 @@ MonoBehaviour:
obj: {fileID: 4765649833677787987}
- name: Btn_story
obj: {fileID: 7731447238900948756}
- name: Te_war
- name: Te_rank
obj: {fileID: 87621599633251042}
- name: Btn_war
- name: Btn_rank
obj: {fileID: 2621985431312564303}
- name: Btn_other
- name: Btn_arena
obj: {fileID: 2673485502122126147}
- name: Te_other
- name: Te_arena
obj: {fileID: 87621599141157135}
- name: Btn_cards
obj: {fileID: 4561376170413005867}
......@@ -5971,14 +5971,6 @@ MonoBehaviour:
obj: {fileID: 281550965111508810}
- name: Te_build
obj: {fileID: 87621598770888904}
- name: sdasda
obj: {fileID: 1796881594}
- name: sdasdasa
obj: {fileID: 471395263}
- name: sdasad
obj: {fileID: 471395263}
- name: asdasda
obj: {fileID: 1796881594}
--- !u!95 &87621597751403527
Animator:
serializedVersion: 4
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册