This commit is contained in:
2020-07-04 14:41:25 +08:00
parent 70c346d2c1
commit a8f02e4da5
3748 changed files with 587372 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
/*
********************************************************************************
*Copyright(C),coolae.net
*Author: wangkaiyuan
*Version: 2.0
*Date: 2017-01-09
*Description: 拖动滑动一页比如可以用在关卡地图页面绑定lua
*Others:
*History:
*********************************************************************************
*/
using UnityEngine;
using System.Collections;
using XLua;
namespace Coolape
{
[RequireComponent (typeof(CLCellLua))]
public class UIDragPage4Lua : UIDragPageContents
{
public CLCellLua uiLua;
bool isFinishInit = false;
LuaFunction lfInit = null;
LuaFunction lfrefresh = null;
LuaFunction lfrefreshCurrent = null;
public override void init (object obj, int index)
{
if (!isFinishInit) {
isFinishInit = true;
if (uiLua != null) {
uiLua.setLua ();
lfInit = uiLua.getLuaFunction ("init");
lfrefresh = uiLua.getLuaFunction ("refresh");
lfrefreshCurrent = uiLua.getLuaFunction ("refreshCurrent");
}
if (lfInit != null) {
uiLua.call(lfInit, uiLua);
}
}
if (lfrefresh != null) {
uiLua.call (lfrefresh, obj, index);
}
}
public override void refreshCurrent (int pageIndex, object obj)
{
init (obj, pageIndex);
if (lfrefreshCurrent != null) {
uiLua.call (lfrefreshCurrent, pageIndex, obj);
}
}
}
}