add
This commit is contained in:
33
Assets/CoolapeFrame/Templates/Lua/NewLuaCell.lua
Normal file
33
Assets/CoolapeFrame/Templates/Lua/NewLuaCell.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
-- xx单元
|
||||
local _cell = {}
|
||||
---@type Coolape.CLCellLua
|
||||
local csSelf = nil
|
||||
local transform = nil
|
||||
local mData = nil
|
||||
local uiobjs = {}
|
||||
|
||||
-- 初始化,只调用一次
|
||||
function _cell.init(csObj)
|
||||
csSelf = csObj
|
||||
transform = csSelf.transform
|
||||
--[[
|
||||
上的组件:getChild(transform, "offset", "Progress BarHong"):GetComponent("UISlider");
|
||||
--]]
|
||||
end
|
||||
|
||||
-- 显示,
|
||||
-- 注意,c#侧不会在调用show时,调用refresh
|
||||
function _cell.show(go, data)
|
||||
mData = data
|
||||
--[[
|
||||
TODO:
|
||||
--]]
|
||||
end
|
||||
|
||||
-- 取得数据
|
||||
function _cell.getData()
|
||||
return mData
|
||||
end
|
||||
|
||||
--------------------------------------------
|
||||
return _cell
|
||||
8
Assets/CoolapeFrame/Templates/Lua/NewLuaCell.lua.meta
Normal file
8
Assets/CoolapeFrame/Templates/Lua/NewLuaCell.lua.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5929db882a664488e82c677c59fee720
|
||||
timeCreated: 1449642212
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
73
Assets/CoolapeFrame/Templates/Lua/NewLuaPanel.lua
Normal file
73
Assets/CoolapeFrame/Templates/Lua/NewLuaPanel.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
-- xx界面
|
||||
do
|
||||
local #SCRIPTNAME# = {}
|
||||
|
||||
---@type Coolape.CLPanelLua
|
||||
local csSelf = nil
|
||||
---@type UnityEngine.Transform
|
||||
local transform = nil
|
||||
local uiobjs = {}
|
||||
|
||||
-- 初始化,只会调用一次
|
||||
function #SCRIPTNAME#.init(csObj)
|
||||
csSelf = csObj;
|
||||
transform = csObj.transform;
|
||||
--[[
|
||||
上的组件:getChild(transform, "offset", "Progress BarHong"):GetComponent("UISlider");
|
||||
--]]
|
||||
end
|
||||
|
||||
-- 设置数据
|
||||
function #SCRIPTNAME#.setData(paras)
|
||||
end
|
||||
|
||||
--当有通用背板显示时的回调
|
||||
function #SCRIPTNAME#.onShowFrame( )
|
||||
end
|
||||
|
||||
-- 显示,在c#中。show为调用refresh,show和refresh的区别在于,当页面已经显示了的情况,当页面再次出现在最上层时,只会调用refresh
|
||||
function #SCRIPTNAME#.show()
|
||||
end
|
||||
|
||||
-- 刷新
|
||||
function #SCRIPTNAME#.refresh()
|
||||
end
|
||||
|
||||
-- 关闭页面
|
||||
function #SCRIPTNAME#.hide()
|
||||
end
|
||||
|
||||
-- 网络请求的回调;cmd:指命,succ:成功失败,msg:消息;paras:服务器下行数据
|
||||
function #SCRIPTNAME#.procNetwork (cmd, succ, msg, paras)
|
||||
--[[
|
||||
if(succ == NetSuccess) then
|
||||
if(cmd == "xxx") then
|
||||
-- TODO:
|
||||
end
|
||||
end
|
||||
--]]
|
||||
end
|
||||
|
||||
-- 处理ui上的事件,例如点击等
|
||||
function #SCRIPTNAME#.uiEventDelegate( go )
|
||||
local goName = go.name;
|
||||
--[[
|
||||
if(goName == "xxx") then
|
||||
--TODO:
|
||||
end
|
||||
--]]
|
||||
end
|
||||
|
||||
-- 当顶层页面发生变化时回调
|
||||
function #SCRIPTNAME#.onTopPanelChange( topPanel )
|
||||
|
||||
end
|
||||
|
||||
-- 当按了返回键时,关闭自己(返值为true时关闭)
|
||||
function #SCRIPTNAME#.hideSelfOnKeyBack( )
|
||||
return true;
|
||||
end
|
||||
|
||||
--------------------------------------------
|
||||
return #SCRIPTNAME#;
|
||||
end
|
||||
8
Assets/CoolapeFrame/Templates/Lua/NewLuaPanel.lua.meta
Normal file
8
Assets/CoolapeFrame/Templates/Lua/NewLuaPanel.lua.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64a05c33e4afa48eb944b4a8b1faa45d
|
||||
timeCreated: 1449641174
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user