1662 lines
61 KiB
C#
1662 lines
61 KiB
C#
|
using Thousandto.Code.Center;
|
|||
|
using Thousandto.Plugins.Common;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using Thousandto.Cfg.Data;
|
|||
|
using Thousandto.Code.Global;
|
|||
|
using Thousandto.Core.Asset;
|
|||
|
using Thousandto.Core.RootSystem;
|
|||
|
|
|||
|
namespace Thousandto.Code.Logic
|
|||
|
{
|
|||
|
//使用Lua端的所有接口
|
|||
|
public class LuaAdaptor
|
|||
|
{
|
|||
|
private Action _requireGlobalCS;
|
|||
|
private Action _requireGlobalLua;
|
|||
|
private Action _requireStringDefines;
|
|||
|
|
|||
|
private Action _coreInitialize;
|
|||
|
private Action _coreUninitialize;
|
|||
|
|
|||
|
private Action<bool> _logicInitialize;
|
|||
|
private Action<bool> _logicUninitialize;
|
|||
|
|
|||
|
private Action<string, GameObject> _createLuaUIScript;
|
|||
|
private CheckUILuaDelegate _onCheckUILuaEvent;
|
|||
|
private CheckUILuaDelegate _onCheckUIEventExt;
|
|||
|
private NoParamesReturnUintArr _onGetResLuaMsgIDEvent;
|
|||
|
private NoParamesReturnUintArr _onGetResLuaExtendMsgIDEvent;
|
|||
|
private DoResMessageDelegate _onDoResMessageEvent;
|
|||
|
private HashSet<uint> _resLuaMsgMap;
|
|||
|
private HashSet<uint> _resLuaExtendMsgMap;
|
|||
|
|
|||
|
private IsRenewForm _onIsRenewFormEvent;
|
|||
|
private Action<string, string[]> _onRenewFormEvent;
|
|||
|
private Action<string, string[]> _onRenewSystemEvent;
|
|||
|
|
|||
|
private EnterSceneDelegate _enterSceneEvent;
|
|||
|
private LeaveSceneDelegate _leaveSceneEvent;
|
|||
|
private ParmesIntReturnInt _getStrengthLvByPosEvent;
|
|||
|
private ParmesIntReturnInt _getDressPeralPowerEvent;
|
|||
|
|
|||
|
private NoParamesReturnStringArr _getStoryTimelineNamesHandler;
|
|||
|
private NoParamesReturnStringArr _getStoryFormNamesHandler;
|
|||
|
private NoParamesReturnBool _getLimitShopStateHandler;
|
|||
|
private NoParamesReturnInt _getXmFightCampHandler;
|
|||
|
private NoParamesReturnInt _getMailNumPromptHandler;
|
|||
|
private NoParamesReturnInt _GetNotReadPresentCountHandler;
|
|||
|
|
|||
|
private DoFunctionCallBackDelegate DoFunctionCallBackHandler;
|
|||
|
private ParamIntNoReturn ShowFuncNotOpenTipsHandler;
|
|||
|
private FunctionOpenedDelegate FunctionOpenedHandler;
|
|||
|
|
|||
|
private ParmesIntReturnInt GetXianPoCountByCfgIdHandler;
|
|||
|
private ParmesIntReturnBool CrystalIsMaxHandler;
|
|||
|
private NoParamesReturnInt GetCurrTitleIDHandler;
|
|||
|
private NoParamesReturnBool IsShowTitleRedpointHandler;
|
|||
|
private NoParamesReturnBool HasMountIdHandler;
|
|||
|
private NoParamesReturnInt GetCurModelIdHandler;
|
|||
|
|
|||
|
private NoParamesReturnInt AddOnHookTimeItemIDHandler;
|
|||
|
private NoParamesReturnInt RemainOnHookTimeHandler;
|
|||
|
private NoParamesReturnInt GetCurItemAddRateHandler;
|
|||
|
private NoParamesReturnInt GetCurWorldLevelHandler;
|
|||
|
|
|||
|
private GetVariableShowTextDelegate GetVariableShowTextHandler;
|
|||
|
private GetVariableShowProgressDelegate GetVariableShowProgressHandler;
|
|||
|
private IsVariableReachDelegate IsVariableReachHandler;
|
|||
|
private GetVariableValueDelegate GetVariableValueHandler;
|
|||
|
private NoParamesReturnBool GetWorldSupportRedHandler;
|
|||
|
private ParamesBoolNoReturn SetWorldSupportRedHandler;
|
|||
|
|
|||
|
private NoParamesReturnUintArr GetChatChanelSortHandler;
|
|||
|
private NoParamesReturnBool IsExistNewLimitShopHandler;
|
|||
|
private Action HideNewLimitShopTipsHandler;
|
|||
|
|
|||
|
private NoParamesReturnUintArr GetTeachArryHander;
|
|||
|
private NoParamesReturnInt GetDailyMaxActiveHander;
|
|||
|
|
|||
|
private NoParamesReturnBool IsRewradGrowthWayFinal;
|
|||
|
private NoParamesReturnInt GetGrowthWayModelId;
|
|||
|
private NoParamesReturnUintArr GetActiveSwordIdList;
|
|||
|
|
|||
|
private ParamFuncNoReturn OpenSkipForm;
|
|||
|
private NoParamNoReturn CloseSkipForm;
|
|||
|
|
|||
|
private ParamTransformNoReturn OpenLimitShopTipsForm;
|
|||
|
|
|||
|
private NoParamesReturnBool CanRewardFreeVip;
|
|||
|
|
|||
|
private NoParamesReturnInt GetJJCLeftTime;
|
|||
|
private NoParamesReturnInt GetGotoNextCountByLevelGiftHandler;
|
|||
|
|
|||
|
private ParmesIntReturnBool CanJoinDaily;
|
|||
|
private ParamIntNoReturn JoinDaily;
|
|||
|
|
|||
|
private NoParamesReturnInt GetStringDefinedLengthHander;
|
|||
|
private ParamIntReturnString GetStringByStringDefinedHander;
|
|||
|
|
|||
|
private NoParamesReturnUintArr GetAssistPetListHander;
|
|||
|
|
|||
|
private NoParamReturnTable GetMeridianAddSkillDicHander;
|
|||
|
|
|||
|
|
|||
|
private ParmesIntIntReturnInt GetChatHeadIconIdHander;
|
|||
|
private ParmesIntReturnInt GetChatHeadFrameIdHander;
|
|||
|
private ParmesIntReturnInt GetChatPaoPaoIdHander;
|
|||
|
|
|||
|
private NoParamesReturnInt GetChatDefaultHeadCfgIdHander;
|
|||
|
private NoParamesReturnInt GetChatDefaultFrameCfgIdHander;
|
|||
|
private NoParamesReturnInt GetChatDefaultPaoPaoCfgIdHander;
|
|||
|
|
|||
|
private NoParamesReturnInt GetChatPlayerHeadCfgIdHander;
|
|||
|
private NoParamesReturnInt GetChatPlayerFrameCfgIdHander;
|
|||
|
private NoParamesReturnInt GetChatPlayerPaoPaoCfgIdHander;
|
|||
|
|
|||
|
private NoParamesReturnBool GetCommandFollowHander;
|
|||
|
private NoParamNoReturn ReqCommandTargetPosHander;
|
|||
|
private NoParamesReturnBool GetCommandHasMonsterHander;
|
|||
|
private ShowItemTipsDelegate GetShowItemTipsHander;
|
|||
|
private ShowItemTipsByidDelegate GetShowItemTipsByIDHander;
|
|||
|
private NoParamNoReturn GetCloseItemTipsHander;
|
|||
|
private NoParamesReturnBool HasJoinedGuildHaneler;
|
|||
|
private NoParamNoReturn ExitGuildHaneler;
|
|||
|
|
|||
|
private AddShowNewItemDelegate AddShowNewItemHander;
|
|||
|
private AddUseNewItemDelegate AddUseNewItemHannder;
|
|||
|
|
|||
|
private ParamIntNoReturn OpenItemQuickGetFormHander;
|
|||
|
private NoParamNoReturn DownLoadPayListHander;
|
|||
|
|
|||
|
//登录以及服务器列表相关的处理
|
|||
|
private NoParamesReturnInt _GetLoginAccountHandler;
|
|||
|
private ParamesBoolNoReturn _ReconnectGameServerHandler;
|
|||
|
private NoParamesReturnInt _GetCurrServerIDHandler;
|
|||
|
private NoParamesReturnString _GetCurrServerNameHandler;
|
|||
|
private ParmesIntReturnBool _HasServerHandler;
|
|||
|
private ParamIntReturnString _GetServerNameHandler;
|
|||
|
private ParmesIntReturnInt _GetServerShowIDHandler;
|
|||
|
private ParmesIntReturnInt _GetReallyServerIDHandler;
|
|||
|
private ParamFuncNoReturn _OpenLoadingFormHandler;
|
|||
|
|
|||
|
private NoParamNoReturn _CloseLoadingFormHandler;
|
|||
|
private ParamIntNoReturn _SetLoadingFormProgressHandler;
|
|||
|
|
|||
|
|
|||
|
//刷新角色外观模型的回调
|
|||
|
private RefreshPlayerSkinModelDelegate _RefreshPlayerModelHandler;
|
|||
|
|
|||
|
//打开npc对话
|
|||
|
private OpenNpcTalkDelegate OpenNpcTalkHandler;
|
|||
|
//绑定lua角色
|
|||
|
private BindLuaCharacterDelegate BindLuaCharacterHandler;
|
|||
|
|
|||
|
private Func<ulong, IPlayerVisualInfo> _CreatePlayerVisualInfoHandler;
|
|||
|
private Func<FSkinTypeCode,FSkinModel> _CreateFSkinModelHandler;
|
|||
|
|
|||
|
//是否有队伍
|
|||
|
private NoParamesReturnBool _IsTeamExistHandler;
|
|||
|
//是否是队伍成员
|
|||
|
private IsTeamMemberDelegate _IsTeamMemberHandler;
|
|||
|
//获取好友界面类型
|
|||
|
private FriendTypeReturnDelegate _GetFriendTypeHandler;
|
|||
|
private IsFriendReturnDelagate _IsFriendHandler;
|
|||
|
private IsEnemyReturnDelagate _IsEnemyHandler;
|
|||
|
private IsShieldReturnDelagate _IsShieldHandler;
|
|||
|
//获取圣装部位的战力
|
|||
|
private ParmesIntReturnInt _GetHolyPartFightPower;
|
|||
|
//获取圣装装备栏道具
|
|||
|
private GetDressHolyEquipDelagate _GetDressHolyEquip;
|
|||
|
//是否可以使用技能
|
|||
|
private ParmesIntReturnBool _CanUseSkillHandler;
|
|||
|
//技能是否需要同步协议
|
|||
|
private ParmesIntReturnBool _SkillIsSyncServerHandler;
|
|||
|
//技能是否CD
|
|||
|
private ParmesIntReturnBool _SkillIsCDHandler;
|
|||
|
//获取技能列表
|
|||
|
private GetMandateSkillListDelagate _GetMandateSkillListHandler;
|
|||
|
//设置飞剑技能
|
|||
|
private SetFlySwordSkillDelagate _SetFlySwordSkillHandler;
|
|||
|
//开始挂机
|
|||
|
private ParamIntNoReturn _StartMandateHandler;
|
|||
|
//结束挂机
|
|||
|
private NoParamNoReturn _EndMandateHandler;
|
|||
|
//重新开始挂机
|
|||
|
private NoParamNoReturn _RestartMandateHandler;
|
|||
|
//挂机时移动
|
|||
|
private NoParamNoReturn _MandateOnMoveHandler;
|
|||
|
//设置挂机暂停
|
|||
|
private ParamFloatNoReturn _SetMandatePauseHandler;
|
|||
|
//是否正在挂机
|
|||
|
private NoParamesReturnBool _IsMandatingHandler;
|
|||
|
//刷新挂机位置
|
|||
|
private NoParamNoReturn _RefreshMandatePosHandler;
|
|||
|
//开始移动
|
|||
|
private NoParamNoReturn _StartMoveHander;
|
|||
|
//停止移动
|
|||
|
private NoParamNoReturn _EndMoveHander;
|
|||
|
//动作名称转换
|
|||
|
private TranslateAnimNameDelegate _TranslateAnimNameHandler;
|
|||
|
//任务进位面
|
|||
|
private ParamIntNoReturn _TaskEnterPlaneHander;
|
|||
|
//任务进位面播动作
|
|||
|
private ParamIntNoReturn _TaskEnterPlaneAnimHander;
|
|||
|
//游戏消息处理
|
|||
|
private OnGameMessageDelagate _OnGameMessageHander;
|
|||
|
//FGameobject的Shader切换处理
|
|||
|
Func<Shader, ModelTypeCode, int, Shader> _OnFGameObjectShaderSwitchHander;
|
|||
|
|
|||
|
//客户端GM命令处理
|
|||
|
private ClientGMDelagate _ClientGMHander;
|
|||
|
|
|||
|
private ParamPlayerHeadNoReturn SetPlayerHeadHander;
|
|||
|
|
|||
|
private ParamIntNoReturn EnterFengXiHander;
|
|||
|
|
|||
|
private SetPlayerLevelDelagate SetPlayerLevelHander;
|
|||
|
|
|||
|
private NoParamesReturnString _getWordFilterIngoreHandler;
|
|||
|
|
|||
|
private ParmesIntIntReturnItemBase _createItembaseByCfgIdHandler;
|
|||
|
|
|||
|
//加载全局类
|
|||
|
public void RequireGlobalCS()
|
|||
|
{
|
|||
|
if (null == _requireGlobalCS)
|
|||
|
{
|
|||
|
_requireGlobalCS = GameCenter.LuaSystem.GetGlobalInPath<Action>("Main.RequireGlobalCS");
|
|||
|
}
|
|||
|
_requireGlobalCS();
|
|||
|
}
|
|||
|
//加载全局类
|
|||
|
public void RequireGlobalLua()
|
|||
|
{
|
|||
|
if (null == _requireGlobalLua)
|
|||
|
{
|
|||
|
_requireGlobalLua = GameCenter.LuaSystem.GetGlobalInPath<Action>("Main.RequireGlobalLua");
|
|||
|
}
|
|||
|
_requireGlobalLua();
|
|||
|
}
|
|||
|
//加载文字配置
|
|||
|
public void RequireStringDefines()
|
|||
|
{
|
|||
|
if (null == _requireStringDefines)
|
|||
|
{
|
|||
|
_requireStringDefines = GameCenter.LuaSystem.GetGlobalInPath<Action>("Main.RequireStringDefines");
|
|||
|
}
|
|||
|
_requireStringDefines();
|
|||
|
}
|
|||
|
//逻辑初始化
|
|||
|
public void LogicInitialize(bool clearLoginData)
|
|||
|
{
|
|||
|
if (null == _logicInitialize)
|
|||
|
{
|
|||
|
_logicInitialize = GameCenter.LuaSystem.GetGlobalInPath<Action<bool>>("Main.LogicInitialize");
|
|||
|
}
|
|||
|
_logicInitialize(clearLoginData);
|
|||
|
}
|
|||
|
//核心系统初始化
|
|||
|
public void CoreInitialize()
|
|||
|
{
|
|||
|
if (null == _coreInitialize)
|
|||
|
{
|
|||
|
_coreInitialize = GameCenter.LuaSystem.GetGlobalInPath<Action>("Main.CoreInitialize");
|
|||
|
}
|
|||
|
_coreInitialize();
|
|||
|
}
|
|||
|
//核心系统卸载
|
|||
|
public void CoreUninitialize()
|
|||
|
{
|
|||
|
if (null == _coreUninitialize)
|
|||
|
{
|
|||
|
_coreUninitialize = GameCenter.LuaSystem.GetGlobalInPath<Action>("Main.CoreUninitialize");
|
|||
|
}
|
|||
|
_coreUninitialize();
|
|||
|
}
|
|||
|
//逻辑系统卸载
|
|||
|
public void LogicUninitialize(bool clearLoginData)
|
|||
|
{
|
|||
|
if (null == _logicUninitialize)
|
|||
|
{
|
|||
|
_logicUninitialize = GameCenter.LuaSystem.GetGlobalInPath<Action<bool>>("Main.LogicUninitialize");
|
|||
|
}
|
|||
|
_logicUninitialize(clearLoginData);
|
|||
|
}
|
|||
|
//获取所有Lua消息ID
|
|||
|
public uint[] GetResLuaMsgID()
|
|||
|
{
|
|||
|
if (null == _onGetResLuaMsgIDEvent)
|
|||
|
{
|
|||
|
_onGetResLuaMsgIDEvent = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnUintArr>("Main.GetResLuaMsgIDs");
|
|||
|
}
|
|||
|
return _onGetResLuaMsgIDEvent();
|
|||
|
}
|
|||
|
//获取所有Lua消息ID
|
|||
|
public uint[] GetResLuaExtendMsgID()
|
|||
|
{
|
|||
|
if (null == _onGetResLuaExtendMsgIDEvent)
|
|||
|
{
|
|||
|
_onGetResLuaExtendMsgIDEvent = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnUintArr>("Main.GetResLuaExtendMsgIDs");
|
|||
|
}
|
|||
|
return _onGetResLuaExtendMsgIDEvent();
|
|||
|
}
|
|||
|
//获取Lua消息ID表
|
|||
|
public HashSet<uint> GetResLuaMsgMap()
|
|||
|
{
|
|||
|
if (null == _resLuaMsgMap)
|
|||
|
{
|
|||
|
_resLuaMsgMap = new HashSet<uint>();
|
|||
|
var msgIDs = GetResLuaMsgID();
|
|||
|
for (int i = 0; i < msgIDs.Length; i++)
|
|||
|
{
|
|||
|
_resLuaMsgMap.Add(msgIDs[i]);
|
|||
|
}
|
|||
|
}
|
|||
|
return _resLuaMsgMap;
|
|||
|
}
|
|||
|
//获取lua扩展消息id表,C#和lua同时执行
|
|||
|
public HashSet<uint> GetResLuaExtendMsgMap()
|
|||
|
{
|
|||
|
if (null == _resLuaExtendMsgMap)
|
|||
|
{
|
|||
|
_resLuaExtendMsgMap = new HashSet<uint>();
|
|||
|
var msgIDs = GetResLuaExtendMsgID();
|
|||
|
for (int i = 0; i < msgIDs.Length; i++)
|
|||
|
{
|
|||
|
_resLuaExtendMsgMap.Add(msgIDs[i]);
|
|||
|
}
|
|||
|
}
|
|||
|
return _resLuaExtendMsgMap;
|
|||
|
}
|
|||
|
//获取lua消息处理函数
|
|||
|
public DoResMessageDelegate GetDoResMessage()
|
|||
|
{
|
|||
|
if (null == _onDoResMessageEvent)
|
|||
|
{
|
|||
|
_onDoResMessageEvent = GameCenter.LuaSystem.GetGlobalInPath<DoResMessageDelegate>("Main.DoResMessage");
|
|||
|
}
|
|||
|
return _onDoResMessageEvent;
|
|||
|
}
|
|||
|
|
|||
|
//加载对应的Lua脚本
|
|||
|
public void CreateLuaUIScript(string name, GameObject gameObjectInst)
|
|||
|
{
|
|||
|
if (null == _createLuaUIScript)
|
|||
|
{
|
|||
|
_createLuaUIScript = GameCenter.LuaSystem.GetGlobalInPath<Action<string, GameObject>>("Main.CreateLuaUIScript");
|
|||
|
}
|
|||
|
_createLuaUIScript(name, gameObjectInst);
|
|||
|
}
|
|||
|
|
|||
|
//检查是否是Lua端定义的事件
|
|||
|
public bool CheckUILuaEvent(int eid)
|
|||
|
{
|
|||
|
if (null == _onCheckUILuaEvent)
|
|||
|
{
|
|||
|
_onCheckUILuaEvent = GameCenter.LuaSystem.GetGlobalInPath<CheckUILuaDelegate>("Main.HasEvent");
|
|||
|
}
|
|||
|
return _onCheckUILuaEvent(eid);
|
|||
|
}
|
|||
|
|
|||
|
//判断在Lua端有没有对UIEventDefine中的数据进行定义
|
|||
|
public bool CheckUIEventExt(int eid)
|
|||
|
{
|
|||
|
if (null == _onCheckUIEventExt)
|
|||
|
{
|
|||
|
_onCheckUIEventExt = GameCenter.LuaSystem.GetGlobalInPath<CheckUILuaDelegate>("Main.HasUIEventExt");
|
|||
|
}
|
|||
|
return _onCheckUIEventExt(eid);
|
|||
|
}
|
|||
|
|
|||
|
//窗体关闭时,是否删除ui预制件
|
|||
|
public bool IsDestroyPrefabOnClose()
|
|||
|
{
|
|||
|
return GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.IsDestroyPrefabOnClose")();
|
|||
|
}
|
|||
|
|
|||
|
//是否运行分析工具
|
|||
|
public bool IsRuntimeProfiler()
|
|||
|
{
|
|||
|
return GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.IsRuntimeProfiler")();
|
|||
|
}
|
|||
|
//是否记录的耗时写文件
|
|||
|
public bool IsRecordWriteFile()
|
|||
|
{
|
|||
|
return GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.IsRecordWriteFile")();
|
|||
|
}
|
|||
|
//是否收集消耗时间
|
|||
|
public bool IsCollectRecord()
|
|||
|
{
|
|||
|
return GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.IsCollectRecord")();
|
|||
|
}
|
|||
|
|
|||
|
//c#获取返回登陆的资源
|
|||
|
public PreLoadAssetInfo[] ToLoginStateNeedAssets()
|
|||
|
{
|
|||
|
return GameCenter.LuaSystem.GetGlobalInPath<Func<PreLoadAssetInfo[]>>("Main.ToLoginStateNeedAssets")();
|
|||
|
}
|
|||
|
|
|||
|
//是否需要重新加载界面
|
|||
|
public bool IsRenewForm(string name)
|
|||
|
{
|
|||
|
if (_onIsRenewFormEvent == null)
|
|||
|
{
|
|||
|
_onIsRenewFormEvent = GameCenter.LuaSystem.GetGlobalInPath<IsRenewForm>("Main.IsRenewForm");
|
|||
|
}
|
|||
|
if (_onIsRenewFormEvent != null)
|
|||
|
{
|
|||
|
return _onIsRenewFormEvent(name);
|
|||
|
}
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
//重新加载逻辑系统
|
|||
|
public void RenewSystem(string name,string[] paths)
|
|||
|
{
|
|||
|
if (_onRenewSystemEvent == null)
|
|||
|
{
|
|||
|
_onRenewSystemEvent = GameCenter.LuaSystem.GetGlobalInPath<Action<string, string[]>>("Main.RenewSystem");
|
|||
|
}
|
|||
|
if (_onRenewSystemEvent != null)
|
|||
|
{
|
|||
|
_onRenewSystemEvent(name, paths);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//重新加载逻辑系统
|
|||
|
public void RenewForm(string name, string[] paths)
|
|||
|
{
|
|||
|
if (_onRenewFormEvent == null)
|
|||
|
{
|
|||
|
_onRenewFormEvent = GameCenter.LuaSystem.GetGlobalInPath<Action<string, string[]>>("Main.RenewForm");
|
|||
|
}
|
|||
|
if (_onRenewFormEvent != null)
|
|||
|
{
|
|||
|
_onRenewFormEvent(name, paths);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//进入地图回调
|
|||
|
public void OnEnterScene(int mapID, bool isPlane)
|
|||
|
{
|
|||
|
if(_enterSceneEvent == null)
|
|||
|
{
|
|||
|
_enterSceneEvent = GameCenter.LuaSystem.GetGlobalInPath<EnterSceneDelegate>("Main.OnEnterScene");
|
|||
|
}
|
|||
|
|
|||
|
if(_enterSceneEvent != null)
|
|||
|
{
|
|||
|
_enterSceneEvent(mapID, isPlane);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//离开地图回调
|
|||
|
public void OnLeaveScene(bool isPlane)
|
|||
|
{
|
|||
|
if(_leaveSceneEvent == null)
|
|||
|
{
|
|||
|
_leaveSceneEvent = GameCenter.LuaSystem.GetGlobalInPath<LeaveSceneDelegate>("Main.OnLeaveScene");
|
|||
|
}
|
|||
|
|
|||
|
if (_leaveSceneEvent != null)
|
|||
|
{
|
|||
|
_leaveSceneEvent(isPlane);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public int GetStrengthLvByPos( int pos )
|
|||
|
{
|
|||
|
if( _getStrengthLvByPosEvent == null )
|
|||
|
{
|
|||
|
_getStrengthLvByPosEvent = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnInt>( "Main.GetStrengthLvByPos" );
|
|||
|
}
|
|||
|
|
|||
|
if ( _getStrengthLvByPosEvent != null )
|
|||
|
{
|
|||
|
return _getStrengthLvByPosEvent( pos );
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
public int GetDressPeralPower(int pos)
|
|||
|
{
|
|||
|
if (_getDressPeralPowerEvent == null)
|
|||
|
{
|
|||
|
_getDressPeralPowerEvent = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnInt>("Main.GetDressPeralPower");
|
|||
|
}
|
|||
|
|
|||
|
if (_getDressPeralPowerEvent != null)
|
|||
|
{
|
|||
|
return _getDressPeralPowerEvent(pos);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
//获取当前故事初始化中所有Timeline名字
|
|||
|
public string[] GetStoryTimelineNames()
|
|||
|
{
|
|||
|
if (_getStoryTimelineNamesHandler == null)
|
|||
|
{
|
|||
|
_getStoryTimelineNamesHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnStringArr>("Main.GetStoryTimelineNames");
|
|||
|
}
|
|||
|
return _getStoryTimelineNamesHandler();
|
|||
|
}
|
|||
|
|
|||
|
//获取当前故事初始化中所有UIForm名字
|
|||
|
public string[] GetStoryFormNames()
|
|||
|
{
|
|||
|
if (_getStoryFormNamesHandler == null)
|
|||
|
{
|
|||
|
_getStoryFormNamesHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnStringArr>("Main.GetStoryFormNames");
|
|||
|
}
|
|||
|
return _getStoryFormNamesHandler();
|
|||
|
}
|
|||
|
|
|||
|
//获取限时商店状态
|
|||
|
public bool GetLimitShopState()
|
|||
|
{
|
|||
|
if (null == _getLimitShopStateHandler)
|
|||
|
{
|
|||
|
_getLimitShopStateHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.GetLimitShopState");
|
|||
|
}
|
|||
|
return _getLimitShopStateHandler();
|
|||
|
}
|
|||
|
|
|||
|
//获取仙盟战玩家阵营值
|
|||
|
public int GetXmFightCamp()
|
|||
|
{
|
|||
|
if (null == _getXmFightCampHandler)
|
|||
|
{
|
|||
|
_getXmFightCampHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetXmFightCamp");
|
|||
|
}
|
|||
|
return _getXmFightCampHandler();
|
|||
|
}
|
|||
|
|
|||
|
//获取邮件提示数量
|
|||
|
public int GetMailNumPrompt()
|
|||
|
{
|
|||
|
if (null == _getMailNumPromptHandler)
|
|||
|
{
|
|||
|
_getMailNumPromptHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetMailNumPrompt");
|
|||
|
}
|
|||
|
return _getMailNumPromptHandler();
|
|||
|
}
|
|||
|
|
|||
|
//获取礼物提示数量
|
|||
|
public int GetNotReadPresentCount()
|
|||
|
{
|
|||
|
if (null == _GetNotReadPresentCountHandler)
|
|||
|
{
|
|||
|
_GetNotReadPresentCountHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetNotReadPresentCount");
|
|||
|
}
|
|||
|
return _GetNotReadPresentCountHandler();
|
|||
|
}
|
|||
|
|
|||
|
//通过功能ID的枚举码,来打开相应功能
|
|||
|
public void DoFunctionCallBack(int code, object param)
|
|||
|
{
|
|||
|
if (null == DoFunctionCallBackHandler)
|
|||
|
{
|
|||
|
DoFunctionCallBackHandler = GameCenter.LuaSystem.GetGlobalInPath<DoFunctionCallBackDelegate>("Main.DoFunctionCallBack");
|
|||
|
}
|
|||
|
DoFunctionCallBackHandler((int)code, param);
|
|||
|
}
|
|||
|
//显示功能未开启提示
|
|||
|
public void ShowFuncNotOpenTips(int code)
|
|||
|
{
|
|||
|
if (null == ShowFuncNotOpenTipsHandler)
|
|||
|
{
|
|||
|
ShowFuncNotOpenTipsHandler = GameCenter.LuaSystem.GetGlobalInPath<ParamIntNoReturn>("Main.ShowFuncNotOpenTips");
|
|||
|
}
|
|||
|
ShowFuncNotOpenTipsHandler(code);
|
|||
|
}
|
|||
|
//功能开启处理
|
|||
|
public void OnFunctionOpened(int idCode, bool isNew)
|
|||
|
{
|
|||
|
if (null == FunctionOpenedHandler)
|
|||
|
{
|
|||
|
FunctionOpenedHandler = GameCenter.LuaSystem.GetGlobalInPath<FunctionOpenedDelegate>("Main.OnFunctionOpened");
|
|||
|
}
|
|||
|
FunctionOpenedHandler(idCode, isNew);
|
|||
|
}
|
|||
|
|
|||
|
//获取背包中仙魄的数量
|
|||
|
public int GetXianPoCountByCfgId(int cfgId)
|
|||
|
{
|
|||
|
if (null == GetXianPoCountByCfgIdHandler)
|
|||
|
{
|
|||
|
GetXianPoCountByCfgIdHandler = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnInt>("Main.GetXianPoCountByCfgId");
|
|||
|
}
|
|||
|
return GetXianPoCountByCfgIdHandler(cfgId);
|
|||
|
}
|
|||
|
|
|||
|
//神兽岛采集物上限
|
|||
|
public bool CrystalIsMax(int id)
|
|||
|
{
|
|||
|
if (null == CrystalIsMaxHandler)
|
|||
|
{
|
|||
|
CrystalIsMaxHandler = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnBool>("Main.CrystalIsMax");
|
|||
|
}
|
|||
|
return CrystalIsMaxHandler(id);
|
|||
|
}
|
|||
|
|
|||
|
//当前穿戴的称号id
|
|||
|
public int GetCurrTitleID()
|
|||
|
{
|
|||
|
if (null == GetCurrTitleIDHandler)
|
|||
|
{
|
|||
|
GetCurrTitleIDHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetCurrTitleID");
|
|||
|
}
|
|||
|
return GetCurrTitleIDHandler();
|
|||
|
}
|
|||
|
|
|||
|
//是否显示称号红点
|
|||
|
public bool IsShowTitleRedpoint()
|
|||
|
{
|
|||
|
if (null == IsShowTitleRedpointHandler)
|
|||
|
{
|
|||
|
IsShowTitleRedpointHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.IsShowTitleRedpoint");
|
|||
|
}
|
|||
|
return IsShowTitleRedpointHandler();
|
|||
|
}
|
|||
|
|
|||
|
//判断是否有设置坐骑模型
|
|||
|
public bool HasMountId()
|
|||
|
{
|
|||
|
if (null == HasMountIdHandler)
|
|||
|
{
|
|||
|
HasMountIdHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.HasMountId");
|
|||
|
}
|
|||
|
return HasMountIdHandler();
|
|||
|
}
|
|||
|
|
|||
|
//获得当前穿戴翅膀ID
|
|||
|
public int GetCurModelId()
|
|||
|
{
|
|||
|
if (null == GetCurModelIdHandler)
|
|||
|
{
|
|||
|
GetCurModelIdHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetCurModelId");
|
|||
|
}
|
|||
|
return GetCurModelIdHandler();
|
|||
|
}
|
|||
|
|
|||
|
//离线经验道具
|
|||
|
public int AddOnHookTimeItemID()
|
|||
|
{
|
|||
|
if (null == AddOnHookTimeItemIDHandler)
|
|||
|
{
|
|||
|
AddOnHookTimeItemIDHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.AddOnHookTimeItemID");
|
|||
|
}
|
|||
|
return AddOnHookTimeItemIDHandler();
|
|||
|
}
|
|||
|
|
|||
|
//剩余挂机时间
|
|||
|
public int RemainOnHookTime()
|
|||
|
{
|
|||
|
if (null == RemainOnHookTimeHandler)
|
|||
|
{
|
|||
|
RemainOnHookTimeHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.RemainOnHookTime");
|
|||
|
}
|
|||
|
return RemainOnHookTimeHandler();
|
|||
|
}
|
|||
|
|
|||
|
//获取当前经验药品加成倍率,百分制
|
|||
|
public int GetCurItemAddRate()
|
|||
|
{
|
|||
|
if (null == GetCurItemAddRateHandler)
|
|||
|
{
|
|||
|
GetCurItemAddRateHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetCurItemAddRate");
|
|||
|
}
|
|||
|
return GetCurItemAddRateHandler();
|
|||
|
}
|
|||
|
|
|||
|
//获取当前世界等级
|
|||
|
public int GetCurWorldLevel()
|
|||
|
{
|
|||
|
if (null == GetCurWorldLevelHandler)
|
|||
|
{
|
|||
|
GetCurWorldLevelHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetCurWorldLevel");
|
|||
|
}
|
|||
|
return GetCurWorldLevelHandler();
|
|||
|
}
|
|||
|
|
|||
|
public string GetVariableShowText(int type, int curValue, int value, bool simplifyValue = false)
|
|||
|
{
|
|||
|
if (null == GetVariableShowTextHandler)
|
|||
|
{
|
|||
|
GetVariableShowTextHandler = GameCenter.LuaSystem.GetGlobalInPath<GetVariableShowTextDelegate>("Main.GetVariableShowText");
|
|||
|
}
|
|||
|
return GetVariableShowTextHandler(type, curValue, value, simplifyValue);
|
|||
|
}
|
|||
|
|
|||
|
public float GetVariableShowProgress(int type, int curValue, int value)
|
|||
|
{
|
|||
|
if (null == GetVariableShowProgressHandler)
|
|||
|
{
|
|||
|
GetVariableShowProgressHandler = GameCenter.LuaSystem.GetGlobalInPath<GetVariableShowProgressDelegate>("Main.GetVariableShowProgress");
|
|||
|
}
|
|||
|
return GetVariableShowProgressHandler(type, curValue, value);
|
|||
|
}
|
|||
|
|
|||
|
public bool IsVariableReach(int type, int curValue, int value)
|
|||
|
{
|
|||
|
if (null == IsVariableReachHandler)
|
|||
|
{
|
|||
|
IsVariableReachHandler = GameCenter.LuaSystem.GetGlobalInPath<IsVariableReachDelegate>("Main.IsVariableReach");
|
|||
|
}
|
|||
|
return IsVariableReachHandler(type, curValue, value);
|
|||
|
}
|
|||
|
|
|||
|
public int GetVariableValue(int code)
|
|||
|
{
|
|||
|
if (null == GetVariableValueHandler)
|
|||
|
{
|
|||
|
GetVariableValueHandler = GameCenter.LuaSystem.GetGlobalInPath<GetVariableValueDelegate>("Main.GetVariableValue");
|
|||
|
}
|
|||
|
return GetVariableValueHandler(code);
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 仙盟支援红点
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
public bool GetXmSupportRedState()
|
|||
|
{
|
|||
|
if (null == GetWorldSupportRedHandler)
|
|||
|
{
|
|||
|
GetWorldSupportRedHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.GetXmSupportRedState");
|
|||
|
}
|
|||
|
return GetWorldSupportRedHandler();
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 仙盟支援红点
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
public void SetXmSupportRedState(bool isRed)
|
|||
|
{
|
|||
|
if (null == SetWorldSupportRedHandler)
|
|||
|
{
|
|||
|
SetWorldSupportRedHandler = GameCenter.LuaSystem.GetGlobalInPath<ParamesBoolNoReturn>("Main.SetXmSupportRedState");
|
|||
|
}
|
|||
|
SetWorldSupportRedHandler(isRed);
|
|||
|
}
|
|||
|
|
|||
|
//获取仙盟战玩家阵营值
|
|||
|
public uint[] GetChatChanelSort()
|
|||
|
{
|
|||
|
if (null == GetChatChanelSortHandler)
|
|||
|
{
|
|||
|
GetChatChanelSortHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnUintArr>("Main.GetChatChanelSort");
|
|||
|
}
|
|||
|
return GetChatChanelSortHandler();
|
|||
|
}
|
|||
|
|
|||
|
//是否有新获得得限时商品
|
|||
|
public bool IsExistNewLimitShop()
|
|||
|
{
|
|||
|
if (null == IsExistNewLimitShopHandler)
|
|||
|
{
|
|||
|
IsExistNewLimitShopHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.IsExistNewLimitShop");
|
|||
|
}
|
|||
|
return IsExistNewLimitShopHandler();
|
|||
|
}
|
|||
|
|
|||
|
//隐藏新限时商品提示
|
|||
|
public void HideNewLimitShopTips()
|
|||
|
{
|
|||
|
if (null == HideNewLimitShopTipsHandler)
|
|||
|
{
|
|||
|
HideNewLimitShopTipsHandler = GameCenter.LuaSystem.GetGlobalInPath<Action>("Main.HideNewLimitShopTips");
|
|||
|
}
|
|||
|
HideNewLimitShopTipsHandler();
|
|||
|
}
|
|||
|
|
|||
|
//获取当前选择的传道配置ID 和 选择的阵法ID
|
|||
|
public uint[] GetTeachArray()
|
|||
|
{
|
|||
|
if (null == GetTeachArryHander)
|
|||
|
{
|
|||
|
GetTeachArryHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnUintArr>("Main.GetTeachArray");
|
|||
|
}
|
|||
|
return GetTeachArryHander();
|
|||
|
}
|
|||
|
|
|||
|
//获取日常最大活跃值
|
|||
|
public int GetDailyMaxActive()
|
|||
|
{
|
|||
|
if (null == GetDailyMaxActiveHander)
|
|||
|
{
|
|||
|
GetDailyMaxActiveHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetDailyMaxActive");
|
|||
|
}
|
|||
|
return GetDailyMaxActiveHander();
|
|||
|
}
|
|||
|
|
|||
|
//是否领取了成长之路最后一个奖励
|
|||
|
public bool IsRewardGrowthWay()
|
|||
|
{
|
|||
|
if (null == IsRewradGrowthWayFinal)
|
|||
|
{
|
|||
|
IsRewradGrowthWayFinal = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.IsRewradGrowthWayFinal");
|
|||
|
}
|
|||
|
return IsRewradGrowthWayFinal();
|
|||
|
}
|
|||
|
//获取成长之路模型ID
|
|||
|
public int GetGrowthWayModellID()
|
|||
|
{
|
|||
|
if (null == GetGrowthWayModelId)
|
|||
|
{
|
|||
|
GetGrowthWayModelId = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetGrowthWayModellID");
|
|||
|
}
|
|||
|
return GetGrowthWayModelId();
|
|||
|
}
|
|||
|
|
|||
|
//获取成长之路模型ID
|
|||
|
public uint[] GetActiveSwordIdArr()
|
|||
|
{
|
|||
|
if (null == GetActiveSwordIdList)
|
|||
|
{
|
|||
|
GetActiveSwordIdList = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnUintArr>("Main.GetActiveSwordIdList");
|
|||
|
}
|
|||
|
return GetActiveSwordIdList();
|
|||
|
}
|
|||
|
|
|||
|
//打开跳过界面
|
|||
|
public void OpenSkipFormFunc(Action action)
|
|||
|
{
|
|||
|
if (null == OpenSkipForm)
|
|||
|
{
|
|||
|
OpenSkipForm = GameCenter.LuaSystem.GetGlobalInPath<ParamFuncNoReturn>("Main.OpenSkipForm");
|
|||
|
}
|
|||
|
OpenSkipForm(action);
|
|||
|
}
|
|||
|
|
|||
|
//关闭跳过界面
|
|||
|
public void CloseSkipFormFunc()
|
|||
|
{
|
|||
|
if (null == CloseSkipForm)
|
|||
|
{
|
|||
|
CloseSkipForm = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.CloseSkipForm");
|
|||
|
}
|
|||
|
CloseSkipForm();
|
|||
|
}
|
|||
|
|
|||
|
//打开限时商城提示界面
|
|||
|
public void OpenLimitShopTipsFormFunc(Transform transform)
|
|||
|
{
|
|||
|
if (null == OpenLimitShopTipsForm)
|
|||
|
{
|
|||
|
OpenLimitShopTipsForm = GameCenter.LuaSystem.GetGlobalInPath<ParamTransformNoReturn>("Main.OpenLimitShopTipsForm");
|
|||
|
}
|
|||
|
OpenLimitShopTipsForm(transform);
|
|||
|
}
|
|||
|
|
|||
|
//是否可以领取免费Vip
|
|||
|
public bool CanRewardFreeVipFunc()
|
|||
|
{
|
|||
|
if (null == CanRewardFreeVip)
|
|||
|
{
|
|||
|
CanRewardFreeVip = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.CanRewardFreeVip");
|
|||
|
}
|
|||
|
return CanRewardFreeVip();
|
|||
|
}
|
|||
|
|
|||
|
//获取竞技场剩余时间
|
|||
|
public int GetJJCLeftTimeFunc()
|
|||
|
{
|
|||
|
if (null == GetJJCLeftTime)
|
|||
|
{
|
|||
|
GetJJCLeftTime = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetJJCLeftTime");
|
|||
|
}
|
|||
|
return GetJJCLeftTime();
|
|||
|
}
|
|||
|
|
|||
|
//获取到下一提示的数量(-1表示不提示,0 可领取, 大于0 显示还差多少等级)
|
|||
|
public int GetGotoNextCountByLevelGift()
|
|||
|
{
|
|||
|
if (null == GetGotoNextCountByLevelGiftHandler)
|
|||
|
{
|
|||
|
GetGotoNextCountByLevelGiftHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetGotoNextCountByLevelGift");
|
|||
|
}
|
|||
|
return GetGotoNextCountByLevelGiftHandler();
|
|||
|
}
|
|||
|
|
|||
|
public bool CanJoinDailyFunc(int id)
|
|||
|
{
|
|||
|
if (null == CanJoinDaily)
|
|||
|
{
|
|||
|
CanJoinDaily = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnBool>("Main.CanJoinDaily");
|
|||
|
}
|
|||
|
return CanJoinDaily(id);
|
|||
|
}
|
|||
|
|
|||
|
public void JoinDailyFunc(int id)
|
|||
|
{
|
|||
|
if (null == JoinDaily)
|
|||
|
{
|
|||
|
JoinDaily = GameCenter.LuaSystem.GetGlobalInPath<ParamIntNoReturn>("Main.JoinDaily");
|
|||
|
}
|
|||
|
JoinDaily(id);
|
|||
|
}
|
|||
|
|
|||
|
public int GetStringDefinedLength()
|
|||
|
{
|
|||
|
if(null == GetStringDefinedLengthHander)
|
|||
|
{
|
|||
|
GetStringDefinedLengthHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetStringDefinedLength");
|
|||
|
}
|
|||
|
return GetStringDefinedLengthHander();
|
|||
|
}
|
|||
|
public string GetStringByStringDefined(int id)
|
|||
|
{
|
|||
|
if (null == GetStringByStringDefinedHander)
|
|||
|
{
|
|||
|
GetStringByStringDefinedHander = GameCenter.LuaSystem.GetGlobalInPath<ParamIntReturnString>("Main.GetStringByStringDefined");
|
|||
|
}
|
|||
|
return GetStringByStringDefinedHander(id);
|
|||
|
}
|
|||
|
|
|||
|
//获取助战宠物列表
|
|||
|
public uint[] GetAssistPetList()
|
|||
|
{
|
|||
|
if(null == GetAssistPetListHander)
|
|||
|
{
|
|||
|
GetAssistPetListHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnUintArr>("Main.GetAssistPetList");
|
|||
|
}
|
|||
|
return GetAssistPetListHander();
|
|||
|
}
|
|||
|
|
|||
|
//获取经脉id对应技能id的table
|
|||
|
public Dictionary<int, int> GetMeridianAddSkillDic()
|
|||
|
{
|
|||
|
if(null == GetMeridianAddSkillDicHander)
|
|||
|
{
|
|||
|
GetMeridianAddSkillDicHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamReturnTable>("Main.GetMeridianAddSkillDic");
|
|||
|
}
|
|||
|
|
|||
|
return GetMeridianAddSkillDicHander();
|
|||
|
}
|
|||
|
|
|||
|
public int GetChatHeadIconId(int id, int occ)
|
|||
|
{
|
|||
|
if (null == GetChatHeadIconIdHander)
|
|||
|
{
|
|||
|
GetChatHeadIconIdHander = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntIntReturnInt>("Main.GetChatHeadIconId");
|
|||
|
}
|
|||
|
return GetChatHeadIconIdHander(id, occ);
|
|||
|
}
|
|||
|
|
|||
|
public int GetChatHeadFrameIconId(int id)
|
|||
|
{
|
|||
|
if (null == GetChatHeadFrameIdHander)
|
|||
|
{
|
|||
|
GetChatHeadFrameIdHander = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnInt>("Main.GetChatHeadFrameIconId");
|
|||
|
}
|
|||
|
return GetChatHeadFrameIdHander(id);
|
|||
|
}
|
|||
|
|
|||
|
public int GetChatPaoPaoIconId(int id)
|
|||
|
{
|
|||
|
if (null == GetChatPaoPaoIdHander)
|
|||
|
{
|
|||
|
GetChatPaoPaoIdHander = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnInt>("Main.GetChatPaoPaoIconId");
|
|||
|
}
|
|||
|
return GetChatPaoPaoIdHander(id);
|
|||
|
}
|
|||
|
|
|||
|
public int GetChatDefaultHeadCfgId()
|
|||
|
{
|
|||
|
if (null == GetChatDefaultHeadCfgIdHander)
|
|||
|
{
|
|||
|
GetChatDefaultHeadCfgIdHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetDefaultChatHeadCfgId");
|
|||
|
}
|
|||
|
return GetChatDefaultHeadCfgIdHander();
|
|||
|
}
|
|||
|
|
|||
|
public int GetChatDefaultHeadFrameCfgId()
|
|||
|
{
|
|||
|
if (null == GetChatDefaultFrameCfgIdHander)
|
|||
|
{
|
|||
|
GetChatDefaultFrameCfgIdHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetDefaultChatHeadFrameCfgId");
|
|||
|
}
|
|||
|
return GetChatDefaultFrameCfgIdHander();
|
|||
|
}
|
|||
|
|
|||
|
public int GetChatDefaultPaoPaoCfgId()
|
|||
|
{
|
|||
|
if (null == GetChatDefaultPaoPaoCfgIdHander)
|
|||
|
{
|
|||
|
GetChatDefaultPaoPaoCfgIdHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetDefaultChatPaoPaoCfgId");
|
|||
|
}
|
|||
|
return GetChatDefaultPaoPaoCfgIdHander();
|
|||
|
}
|
|||
|
|
|||
|
public int GetChatPlayerHeadCfgId()
|
|||
|
{
|
|||
|
if (null == GetChatPlayerHeadCfgIdHander)
|
|||
|
{
|
|||
|
GetChatPlayerHeadCfgIdHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetPlayerChatHeadCfgId");
|
|||
|
}
|
|||
|
return GetChatPlayerHeadCfgIdHander();
|
|||
|
}
|
|||
|
|
|||
|
public int GetChatPlayerHeadFrameCfgId()
|
|||
|
{
|
|||
|
if (null == GetChatPlayerFrameCfgIdHander)
|
|||
|
{
|
|||
|
GetChatPlayerFrameCfgIdHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetPlayerChatHeadFrameCfgId");
|
|||
|
}
|
|||
|
return GetChatPlayerFrameCfgIdHander();
|
|||
|
}
|
|||
|
|
|||
|
public int GetChatPlayerPaoPaoCfgId()
|
|||
|
{
|
|||
|
if (null == GetChatPlayerPaoPaoCfgIdHander)
|
|||
|
{
|
|||
|
GetChatPlayerPaoPaoCfgIdHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetPlayerChatPaoPaoCfgId");
|
|||
|
}
|
|||
|
return GetChatPlayerPaoPaoCfgIdHander();
|
|||
|
}
|
|||
|
|
|||
|
public void ReqCommandTargetPos()
|
|||
|
{
|
|||
|
if (null == ReqCommandTargetPosHander)
|
|||
|
{
|
|||
|
ReqCommandTargetPosHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.ReqCommandTargetPos");
|
|||
|
}
|
|||
|
ReqCommandTargetPosHander();
|
|||
|
}
|
|||
|
|
|||
|
public bool GetCommandFollow()
|
|||
|
{
|
|||
|
if (null == GetCommandFollowHander)
|
|||
|
{
|
|||
|
GetCommandFollowHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.GetCommandFollow");
|
|||
|
}
|
|||
|
return GetCommandFollowHander();
|
|||
|
}
|
|||
|
|
|||
|
public bool GetCommandHasMonster()
|
|||
|
{
|
|||
|
if (null == GetCommandHasMonsterHander)
|
|||
|
{
|
|||
|
GetCommandHasMonsterHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.GetCommandHasMonster");
|
|||
|
}
|
|||
|
return GetCommandHasMonsterHander();
|
|||
|
}
|
|||
|
|
|||
|
public void AddShowNewItem(int reason, ItemBase item, long count)
|
|||
|
{
|
|||
|
if (null == AddShowNewItemHander)
|
|||
|
{
|
|||
|
AddShowNewItemHander = GameCenter.LuaSystem.GetGlobalInPath<AddShowNewItemDelegate>("Main.AddShowNewItem");
|
|||
|
}
|
|||
|
AddShowNewItemHander(reason, item, item.CfgID, count);
|
|||
|
|
|||
|
}
|
|||
|
public void AddShowNewItem(int reason, int itemID, long count)
|
|||
|
{
|
|||
|
if (null == AddShowNewItemHander)
|
|||
|
{
|
|||
|
AddShowNewItemHander = GameCenter.LuaSystem.GetGlobalInPath<AddShowNewItemDelegate>("Main.AddShowNewItem");
|
|||
|
}
|
|||
|
AddShowNewItemHander(reason, null, itemID, count);
|
|||
|
}
|
|||
|
public void AddUseNewItem(ItemBase itemInst, int reason, long addCount)
|
|||
|
{
|
|||
|
if (null == AddUseNewItemHannder)
|
|||
|
{
|
|||
|
AddUseNewItemHannder = GameCenter.LuaSystem.GetGlobalInPath<AddUseNewItemDelegate>("Main.AddUseNewItem");
|
|||
|
}
|
|||
|
AddUseNewItemHannder(itemInst, reason, addCount);
|
|||
|
}
|
|||
|
|
|||
|
public void OpenItemQuickGetForm(int itemId)
|
|||
|
{
|
|||
|
if (null == OpenItemQuickGetFormHander)
|
|||
|
{
|
|||
|
OpenItemQuickGetFormHander = GameCenter.LuaSystem.GetGlobalInPath<ParamIntNoReturn>("Main.OpenItemQuickGetForm");
|
|||
|
}
|
|||
|
OpenItemQuickGetFormHander(itemId);
|
|||
|
}
|
|||
|
public void ShowItemTips(ItemBase goods, GameObject obj, ItemTipsLocation location = ItemTipsLocation.Defult, bool isShowGetBtn = true,
|
|||
|
ItemBase cost = null, bool isResetPosion = true, object ExtData = null)
|
|||
|
{
|
|||
|
if (null == GetShowItemTipsHander)
|
|||
|
{
|
|||
|
GetShowItemTipsHander = GameCenter.LuaSystem.GetGlobalInPath<ShowItemTipsDelegate>("Main.ShowItemTips");
|
|||
|
}
|
|||
|
GetShowItemTipsHander(goods, obj, location, isShowGetBtn, cost, isResetPosion, ExtData);
|
|||
|
}
|
|||
|
public void ShowItemTips(int id, GameObject obj, bool isShowGetBtn = true, ItemTipsLocation location = ItemTipsLocation.Defult)
|
|||
|
{
|
|||
|
if (null == GetShowItemTipsByIDHander)
|
|||
|
{
|
|||
|
GetShowItemTipsByIDHander = GameCenter.LuaSystem.GetGlobalInPath<ShowItemTipsByidDelegate>("Main.ShowItemTipsByID");
|
|||
|
}
|
|||
|
GetShowItemTipsByIDHander(id, obj, isShowGetBtn, location);
|
|||
|
}
|
|||
|
public void CloseItemTips()
|
|||
|
{
|
|||
|
if (null == GetCloseItemTipsHander)
|
|||
|
{
|
|||
|
GetCloseItemTipsHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.CloseItemTips");
|
|||
|
}
|
|||
|
GetCloseItemTipsHander();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public int GetLoginAccount()
|
|||
|
{
|
|||
|
if (null == _GetLoginAccountHandler)
|
|||
|
{
|
|||
|
_GetLoginAccountHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetLoginAccount");
|
|||
|
}
|
|||
|
return _GetLoginAccountHandler();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public void ReconnectGameServer(bool isChangeRole)
|
|||
|
{
|
|||
|
if (null == _ReconnectGameServerHandler)
|
|||
|
{
|
|||
|
_ReconnectGameServerHandler = GameCenter.LuaSystem.GetGlobalInPath<ParamesBoolNoReturn>("Main.ReconnectGameServer");
|
|||
|
}
|
|||
|
_ReconnectGameServerHandler(isChangeRole);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public int GetCurrServerID()
|
|||
|
{
|
|||
|
if (null == _GetCurrServerIDHandler)
|
|||
|
{
|
|||
|
_GetCurrServerIDHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnInt>("Main.GetCurrServerID");
|
|||
|
}
|
|||
|
return _GetCurrServerIDHandler();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public string GetCurrServerName()
|
|||
|
{
|
|||
|
if (null == _GetCurrServerNameHandler)
|
|||
|
{
|
|||
|
_GetCurrServerNameHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnString>("Main.GetCurrServerName");
|
|||
|
}
|
|||
|
return _GetCurrServerNameHandler();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public bool HasServer(int serverID)
|
|||
|
{
|
|||
|
if (null == _HasServerHandler)
|
|||
|
{
|
|||
|
_HasServerHandler = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnBool>("Main.HasServer");
|
|||
|
}
|
|||
|
return _HasServerHandler(serverID);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public string GetServerName(int serverID)
|
|||
|
{
|
|||
|
if (null == _GetServerNameHandler)
|
|||
|
{
|
|||
|
_GetServerNameHandler = GameCenter.LuaSystem.GetGlobalInPath<ParamIntReturnString>("Main.GetServerName");
|
|||
|
}
|
|||
|
return _GetServerNameHandler(serverID);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public int GetServerShowID(int serverID)
|
|||
|
{
|
|||
|
if (null == _GetServerShowIDHandler)
|
|||
|
{
|
|||
|
_GetServerShowIDHandler = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnInt>("Main.GetServerShowID");
|
|||
|
}
|
|||
|
return _GetServerShowIDHandler(serverID);
|
|||
|
}
|
|||
|
|
|||
|
public int GetReallyServerID(int serverID)
|
|||
|
{
|
|||
|
if (null == _GetReallyServerIDHandler)
|
|||
|
{
|
|||
|
_GetReallyServerIDHandler = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnInt>("Main.GetReallyServerID");
|
|||
|
}
|
|||
|
return _GetReallyServerIDHandler(serverID);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public bool HasJoinedGuild()
|
|||
|
{
|
|||
|
if (null == HasJoinedGuildHaneler)
|
|||
|
{
|
|||
|
HasJoinedGuildHaneler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.HasJoinedGuild");
|
|||
|
}
|
|||
|
return HasJoinedGuildHaneler();
|
|||
|
}
|
|||
|
|
|||
|
public void OnExitGuildMsg()
|
|||
|
{
|
|||
|
if (null == ExitGuildHaneler)
|
|||
|
{
|
|||
|
ExitGuildHaneler = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.OnExitGuildMsg");
|
|||
|
}
|
|||
|
ExitGuildHaneler();
|
|||
|
}
|
|||
|
|
|||
|
public void DownLoadPayList()
|
|||
|
{
|
|||
|
if (null == DownLoadPayListHander)
|
|||
|
{
|
|||
|
DownLoadPayListHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.DownLoadPayList");
|
|||
|
}
|
|||
|
DownLoadPayListHander();
|
|||
|
}
|
|||
|
|
|||
|
public void OpenLoadingForm(Action callBack = null)
|
|||
|
{
|
|||
|
if (null == _OpenLoadingFormHandler)
|
|||
|
{
|
|||
|
_OpenLoadingFormHandler = GameCenter.LuaSystem.GetGlobalInPath<ParamFuncNoReturn>("Main.OpenLoadingForm");
|
|||
|
}
|
|||
|
_OpenLoadingFormHandler(callBack);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public void CloseLoadingForm()
|
|||
|
{
|
|||
|
if (null == _CloseLoadingFormHandler)
|
|||
|
{
|
|||
|
_CloseLoadingFormHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.CloseLoadingForm");
|
|||
|
}
|
|||
|
_CloseLoadingFormHandler();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public void SetLoadingFormProgress(float value)
|
|||
|
{
|
|||
|
if (null == _SetLoadingFormProgressHandler)
|
|||
|
{
|
|||
|
_SetLoadingFormProgressHandler = GameCenter.LuaSystem.GetGlobalInPath<ParamIntNoReturn>("Main.SetLoadingFormProgress");
|
|||
|
}
|
|||
|
_SetLoadingFormProgressHandler(Mathf.RoundToInt(value * 10000));
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public void RefreshPlayerModel(Player p, IPlayerVisualInfo info)
|
|||
|
{
|
|||
|
if (null == _RefreshPlayerModelHandler)
|
|||
|
{
|
|||
|
_RefreshPlayerModelHandler = GameCenter.LuaSystem.GetGlobalInPath<RefreshPlayerSkinModelDelegate>("Main.RefreshPlayerModel");
|
|||
|
}
|
|||
|
_RefreshPlayerModelHandler(p, info);
|
|||
|
}
|
|||
|
//打开npc对话
|
|||
|
public void OpenNpcTalk(Npc npc, int taskID = 0, bool isTaskOpenUI = false, object openUIParam = null)
|
|||
|
{
|
|||
|
if (null == OpenNpcTalkHandler)
|
|||
|
{
|
|||
|
OpenNpcTalkHandler = GameCenter.LuaSystem.GetGlobalInPath<OpenNpcTalkDelegate>("Main.OpenNpcTalk");
|
|||
|
}
|
|||
|
OpenNpcTalkHandler(npc, taskID, isTaskOpenUI, openUIParam);
|
|||
|
}
|
|||
|
//绑定自定义角色
|
|||
|
public void BindLuaCharacter(LuaCharacter character, LuaCharInitInfo initInfo)
|
|||
|
{
|
|||
|
if(null == BindLuaCharacterHandler)
|
|||
|
{
|
|||
|
BindLuaCharacterHandler = GameCenter.LuaSystem.GetGlobalInPath<BindLuaCharacterDelegate>("Main.BindLuaCharacter");
|
|||
|
}
|
|||
|
BindLuaCharacterHandler(character, initInfo);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
//创建一个新的对象
|
|||
|
public IPlayerVisualInfo CreatePlayerVisualInfo(ulong roleID)
|
|||
|
{
|
|||
|
if (null == _CreatePlayerVisualInfoHandler)
|
|||
|
{
|
|||
|
_CreatePlayerVisualInfoHandler = GameCenter.LuaSystem.GetGlobalInPath<Func<ulong, IPlayerVisualInfo>>("Main.CreatePlayerVisualInfo");
|
|||
|
}
|
|||
|
return _CreatePlayerVisualInfoHandler(roleID);
|
|||
|
}
|
|||
|
|
|||
|
//创建一个新的对象
|
|||
|
public FSkinModel CreateFSkinModel(FSkinTypeCode code)
|
|||
|
{
|
|||
|
if (null == _CreateFSkinModelHandler)
|
|||
|
{
|
|||
|
_CreateFSkinModelHandler = GameCenter.LuaSystem.GetGlobalInPath<Func<FSkinTypeCode,FSkinModel>>("Main.CreateFSkinModel");
|
|||
|
}
|
|||
|
return _CreateFSkinModelHandler(code);
|
|||
|
}
|
|||
|
|
|||
|
//是否有队伍
|
|||
|
public bool IsTeamExist()
|
|||
|
{
|
|||
|
if(null == _IsTeamExistHandler)
|
|||
|
{
|
|||
|
_IsTeamExistHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.IsTeamExist");
|
|||
|
}
|
|||
|
return _IsTeamExistHandler();
|
|||
|
}
|
|||
|
//是否是队伍成员
|
|||
|
public bool IsTeamMember(ulong id)
|
|||
|
{
|
|||
|
if (null == _IsTeamMemberHandler)
|
|||
|
{
|
|||
|
_IsTeamMemberHandler = GameCenter.LuaSystem.GetGlobalInPath<IsTeamMemberDelegate>("Main.IsTeamMember");
|
|||
|
}
|
|||
|
return _IsTeamMemberHandler(id);
|
|||
|
}
|
|||
|
|
|||
|
//获取好友界面类型
|
|||
|
public int GetFriendType()
|
|||
|
{
|
|||
|
if (null == _GetFriendTypeHandler)
|
|||
|
{
|
|||
|
_GetFriendTypeHandler = GameCenter.LuaSystem.GetGlobalInPath<FriendTypeReturnDelegate>("Main.GetFriendType");
|
|||
|
}
|
|||
|
return _GetFriendTypeHandler();
|
|||
|
}
|
|||
|
|
|||
|
//判断是否是好友
|
|||
|
public bool IsFriend(ulong id)
|
|||
|
{
|
|||
|
if (null == _IsFriendHandler)
|
|||
|
{
|
|||
|
_IsFriendHandler = GameCenter.LuaSystem.GetGlobalInPath<IsFriendReturnDelagate>("Main.IsFriend");
|
|||
|
}
|
|||
|
return _IsFriendHandler(id);
|
|||
|
}
|
|||
|
|
|||
|
//判断是否在黑名单
|
|||
|
public bool IsShield(ulong id)
|
|||
|
{
|
|||
|
if (null == _IsShieldHandler)
|
|||
|
{
|
|||
|
_IsShieldHandler = GameCenter.LuaSystem.GetGlobalInPath<IsShieldReturnDelagate>("Main.IsShield");
|
|||
|
}
|
|||
|
return _IsShieldHandler(id);
|
|||
|
}
|
|||
|
|
|||
|
//判断是否是仇人
|
|||
|
public bool IsEnemy(ulong id)
|
|||
|
{
|
|||
|
if (null == _IsEnemyHandler)
|
|||
|
{
|
|||
|
_IsEnemyHandler = GameCenter.LuaSystem.GetGlobalInPath<IsEnemyReturnDelagate>("Main.IsEnemy");
|
|||
|
}
|
|||
|
return _IsEnemyHandler(id);
|
|||
|
}
|
|||
|
|
|||
|
//获取圣装部位的战力
|
|||
|
public int GetHolyPartFightPower(int part)
|
|||
|
{
|
|||
|
if (null == _GetHolyPartFightPower)
|
|||
|
{
|
|||
|
_GetHolyPartFightPower = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnInt>("Main.GetHolyPartFightPower");
|
|||
|
}
|
|||
|
return _GetHolyPartFightPower(part);
|
|||
|
}
|
|||
|
|
|||
|
//获取圣装装备栏道具
|
|||
|
public HolyEquip GetDressHolyEquip(int part)
|
|||
|
{
|
|||
|
if (null == _GetDressHolyEquip)
|
|||
|
{
|
|||
|
_GetDressHolyEquip = GameCenter.LuaSystem.GetGlobalInPath<GetDressHolyEquipDelagate>("Main.GetDressHolyEquip");
|
|||
|
}
|
|||
|
return _GetDressHolyEquip(part);
|
|||
|
}
|
|||
|
//是否可以使用技能
|
|||
|
public bool CanUseSkill(int skillId)
|
|||
|
{
|
|||
|
if (null == _CanUseSkillHandler)
|
|||
|
{
|
|||
|
_CanUseSkillHandler = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnBool>("Main.CanUseSkill");
|
|||
|
}
|
|||
|
return _CanUseSkillHandler(skillId);
|
|||
|
}
|
|||
|
//技能是否需要同步协议
|
|||
|
public bool SkillIsSyncServer(int skillId)
|
|||
|
{
|
|||
|
if (null == _SkillIsSyncServerHandler)
|
|||
|
{
|
|||
|
_SkillIsSyncServerHandler = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnBool>("Main.SkillIsSyncServer");
|
|||
|
}
|
|||
|
return _SkillIsSyncServerHandler(skillId);
|
|||
|
}
|
|||
|
//技能是否CD
|
|||
|
public bool SkillIsCD(int skillId)
|
|||
|
{
|
|||
|
if (null == _SkillIsCDHandler)
|
|||
|
{
|
|||
|
_SkillIsCDHandler = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntReturnBool>("Main.SkillIsCD");
|
|||
|
}
|
|||
|
return _SkillIsCDHandler(skillId);
|
|||
|
}
|
|||
|
//获取技能列表
|
|||
|
public List<int> GetMandateSkillList()
|
|||
|
{
|
|||
|
if (null == _GetMandateSkillListHandler)
|
|||
|
{
|
|||
|
_GetMandateSkillListHandler = GameCenter.LuaSystem.GetGlobalInPath<GetMandateSkillListDelagate>("Main.GetMandateSkillList");
|
|||
|
}
|
|||
|
return _GetMandateSkillListHandler();
|
|||
|
}
|
|||
|
//设置飞剑技能
|
|||
|
public void SetFlySwordSkill(int swordSkill, int playerSkill)
|
|||
|
{
|
|||
|
if (null == _SetFlySwordSkillHandler)
|
|||
|
{
|
|||
|
_SetFlySwordSkillHandler = GameCenter.LuaSystem.GetGlobalInPath<SetFlySwordSkillDelagate>("Main.SetFlySwordSkill");
|
|||
|
}
|
|||
|
_SetFlySwordSkillHandler(swordSkill, playerSkill);
|
|||
|
}
|
|||
|
//开始挂机
|
|||
|
public void StartMandate(int monsterId = 0)
|
|||
|
{
|
|||
|
if (null == _StartMandateHandler)
|
|||
|
{
|
|||
|
_StartMandateHandler = GameCenter.LuaSystem.GetGlobalInPath<ParamIntNoReturn>("Main.StartMandate");
|
|||
|
}
|
|||
|
_StartMandateHandler(monsterId);
|
|||
|
}
|
|||
|
//结束挂机
|
|||
|
public void EndMandate(int monsterId = 0)
|
|||
|
{
|
|||
|
if (null == _EndMandateHandler)
|
|||
|
{
|
|||
|
_EndMandateHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.EndMandate");
|
|||
|
}
|
|||
|
_EndMandateHandler();
|
|||
|
}
|
|||
|
//重新开始挂机
|
|||
|
public void RestartMandate()
|
|||
|
{
|
|||
|
if (null == _RestartMandateHandler)
|
|||
|
{
|
|||
|
_RestartMandateHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.RestartMandate");
|
|||
|
}
|
|||
|
_RestartMandateHandler();
|
|||
|
}
|
|||
|
//挂机时移动
|
|||
|
public void MandateOnMove()
|
|||
|
{
|
|||
|
if (null == _MandateOnMoveHandler)
|
|||
|
{
|
|||
|
_MandateOnMoveHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.MandateOnMove");
|
|||
|
}
|
|||
|
_MandateOnMoveHandler();
|
|||
|
}
|
|||
|
//设置挂机暂停
|
|||
|
public void SetMandatePause(float time)
|
|||
|
{
|
|||
|
if (null == _SetMandatePauseHandler)
|
|||
|
{
|
|||
|
_SetMandatePauseHandler = GameCenter.LuaSystem.GetGlobalInPath<ParamFloatNoReturn>("Main.SetMandatePause");
|
|||
|
}
|
|||
|
_SetMandatePauseHandler(time);
|
|||
|
}
|
|||
|
//是否正在挂机
|
|||
|
public bool IsMandating()
|
|||
|
{
|
|||
|
if (null == _IsMandatingHandler)
|
|||
|
{
|
|||
|
_IsMandatingHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnBool>("Main.IsMandating");
|
|||
|
}
|
|||
|
return _IsMandatingHandler();
|
|||
|
}
|
|||
|
//刷新挂机位置
|
|||
|
public void RefreshMandatePos()
|
|||
|
{
|
|||
|
if (null == _RefreshMandatePosHandler)
|
|||
|
{
|
|||
|
_RefreshMandatePosHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.RefreshMandatePos");
|
|||
|
}
|
|||
|
_RefreshMandatePosHandler();
|
|||
|
}
|
|||
|
|
|||
|
public void StartMove()
|
|||
|
{
|
|||
|
if(null == _StartMoveHander)
|
|||
|
_StartMoveHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.StartMove");
|
|||
|
_StartMoveHander();
|
|||
|
}
|
|||
|
|
|||
|
public void EndMove()
|
|||
|
{
|
|||
|
if (null == _EndMoveHander)
|
|||
|
_EndMoveHander = GameCenter.LuaSystem.GetGlobalInPath<NoParamNoReturn>("Main.EndMove");
|
|||
|
_EndMoveHander();
|
|||
|
}
|
|||
|
|
|||
|
//获取动作转换函数
|
|||
|
public TranslateAnimNameDelegate GetTranslateAnimName()
|
|||
|
{
|
|||
|
if (null == _TranslateAnimNameHandler)
|
|||
|
{
|
|||
|
_TranslateAnimNameHandler = GameCenter.LuaSystem.GetGlobalInPath<TranslateAnimNameDelegate>("Main.GetTranslateAnimName");
|
|||
|
}
|
|||
|
return _TranslateAnimNameHandler;
|
|||
|
}
|
|||
|
|
|||
|
//任务进入位面
|
|||
|
public void TaskEnterPlane(int taskId)
|
|||
|
{
|
|||
|
if (null == _TaskEnterPlaneHander)
|
|||
|
{
|
|||
|
_TaskEnterPlaneHander = GameCenter.LuaSystem.GetGlobalInPath<ParamIntNoReturn>("Main.TaskEnterPlane");
|
|||
|
}
|
|||
|
_TaskEnterPlaneHander(taskId);
|
|||
|
}
|
|||
|
|
|||
|
public void TaskEnterPlaneAnim(int taskId)
|
|||
|
{
|
|||
|
if (null == _TaskEnterPlaneAnimHander)
|
|||
|
{
|
|||
|
_TaskEnterPlaneAnimHander = GameCenter.LuaSystem.GetGlobalInPath<ParamIntNoReturn>("Main.TaskEnterPlaneAnim");
|
|||
|
}
|
|||
|
_TaskEnterPlaneAnimHander(taskId);
|
|||
|
}
|
|||
|
//游戏消息处理
|
|||
|
public bool OnGameMessage(Message msg)
|
|||
|
{
|
|||
|
if (null == _OnGameMessageHander)
|
|||
|
{
|
|||
|
_OnGameMessageHander = GameCenter.LuaSystem.GetGlobalInPath<OnGameMessageDelagate>("Main.OnGameMessage");
|
|||
|
}
|
|||
|
return _OnGameMessageHander(msg);
|
|||
|
}
|
|||
|
|
|||
|
//FGameobject相关的Shader切换处理
|
|||
|
public Shader OnFGameObjectShaderSwitch(Shader sh, ModelTypeCode code, int modelID)
|
|||
|
{
|
|||
|
if (null == _OnFGameObjectShaderSwitchHander)
|
|||
|
{
|
|||
|
_OnFGameObjectShaderSwitchHander = GameCenter.LuaSystem.GetGlobalInPath<Func<Shader, ModelTypeCode, int, Shader>>("Main.ShaderSwitch");
|
|||
|
}
|
|||
|
return _OnFGameObjectShaderSwitchHander(sh, code, modelID);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
//FGameobject相关的Shader切换处理
|
|||
|
public bool OnClientGM(string cmd)
|
|||
|
{
|
|||
|
if (null == _ClientGMHander)
|
|||
|
{
|
|||
|
_ClientGMHander = GameCenter.LuaSystem.GetGlobalInPath<ClientGMDelagate>("Main.OnClientGM");
|
|||
|
}
|
|||
|
return _ClientGMHander(cmd);
|
|||
|
}
|
|||
|
|
|||
|
public void SetPlayerHead(Transform trans, int iconId, int frameId, int occ, ulong playerId, string pic, bool isShowPic)
|
|||
|
{
|
|||
|
if (null == SetPlayerHeadHander)
|
|||
|
{
|
|||
|
SetPlayerHeadHander = GameCenter.LuaSystem.GetGlobalInPath<ParamPlayerHeadNoReturn>("Main.SetPlayerHead");
|
|||
|
}
|
|||
|
SetPlayerHeadHander(trans, iconId, frameId, occ, playerId, pic, isShowPic);
|
|||
|
}
|
|||
|
|
|||
|
public void EnterFengXi(int cityId)
|
|||
|
{
|
|||
|
if (null == EnterFengXiHander)
|
|||
|
{
|
|||
|
EnterFengXiHander = GameCenter.LuaSystem.GetGlobalInPath<ParamIntNoReturn>("Main.EnterFengXi");
|
|||
|
}
|
|||
|
EnterFengXiHander(cityId);
|
|||
|
}
|
|||
|
public void SetPlayerLevel(Transform trans, int level, bool showLevelText)
|
|||
|
{
|
|||
|
if (null == SetPlayerLevelHander)
|
|||
|
{
|
|||
|
SetPlayerLevelHander = GameCenter.LuaSystem.GetGlobalInPath<SetPlayerLevelDelagate>("Main.SetPlayerLevel");
|
|||
|
}
|
|||
|
SetPlayerLevelHander(trans, level, showLevelText);
|
|||
|
}
|
|||
|
|
|||
|
public string GetWordFilterIngore()
|
|||
|
{
|
|||
|
if (null == _getWordFilterIngoreHandler)
|
|||
|
{
|
|||
|
_getWordFilterIngoreHandler = GameCenter.LuaSystem.GetGlobalInPath<NoParamesReturnString>("Main.GetWordFilterIngore");
|
|||
|
}
|
|||
|
return _getWordFilterIngoreHandler();
|
|||
|
}
|
|||
|
|
|||
|
public ItemBase CreateItembaseByCfgId(int itemId)
|
|||
|
{
|
|||
|
if (null == _createItembaseByCfgIdHandler)
|
|||
|
{
|
|||
|
_createItembaseByCfgIdHandler = GameCenter.LuaSystem.GetGlobalInPath<ParmesIntIntReturnItemBase>("Main.CreateItembaseByCfgId");
|
|||
|
}
|
|||
|
return _createItembaseByCfgIdHandler(itemId);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public delegate bool NoParamesReturnBool();
|
|||
|
public delegate int NoParamesReturnInt();
|
|||
|
public delegate string NoParamesReturnString();
|
|||
|
public delegate uint[] NoParamesReturnUintArr();
|
|||
|
public delegate string[] NoParamesReturnStringArr();
|
|||
|
public delegate void ParamesBoolNoReturn(bool isRed);
|
|||
|
public delegate void ParamTransformNoReturn(Transform transform);
|
|||
|
|
|||
|
public delegate int ParmesIntReturnInt(int intParam);
|
|||
|
public delegate int ParmesIntIntReturnInt(int intParam1, int intParam2);
|
|||
|
public delegate bool ParmesIntReturnBool(int intParam);
|
|||
|
|
|||
|
public delegate void DoFunctionCallBackDelegate(int code, object param);
|
|||
|
public delegate void FunctionOpenedDelegate(int idCode, bool isNew);
|
|||
|
|
|||
|
public delegate bool CheckUILuaDelegate(int eid);
|
|||
|
public delegate bool IsRenewForm(string name);
|
|||
|
public delegate void EnterSceneDelegate(int mapID, bool isPlane);
|
|||
|
public delegate void LeaveSceneDelegate(bool isPlane);
|
|||
|
public delegate void ScreenOrientationChanged(int ScreenOrientation);
|
|||
|
|
|||
|
public delegate string GetVariableShowTextDelegate(int type, int curValue, int value, bool simplifyValue = false);
|
|||
|
public delegate float GetVariableShowProgressDelegate(int type, int curValue, int value);
|
|||
|
public delegate bool IsVariableReachDelegate(int type, int curValue, int value);
|
|||
|
public delegate int GetVariableValueDelegate(int code);
|
|||
|
public delegate void ShowItemTipsDelegate(ItemBase goods, GameObject obj, ItemTipsLocation location, bool isShowGetBtn, ItemBase cost, bool isResetPosion, object ExtData);
|
|||
|
public delegate void ShowItemTipsByidDelegate(int id, GameObject obj, bool isShowGetBtn, ItemTipsLocation location);
|
|||
|
|
|||
|
public delegate void ParamFuncNoReturn(Action action);
|
|||
|
public delegate void NoParamNoReturn();
|
|||
|
|
|||
|
public delegate void ParamIntNoReturn(int id);
|
|||
|
public delegate string ParamIntReturnString(int id);
|
|||
|
|
|||
|
public delegate Dictionary<int, int> NoParamReturnTable();
|
|||
|
public delegate void AddShowNewItemDelegate(int reason, ItemBase itemInst, int itemID, long addCount);
|
|||
|
public delegate void AddUseNewItemDelegate(ItemBase itemInst, int reason, long addCount);
|
|||
|
|
|||
|
public delegate string RefreshPlayerSkinModelDelegate(Player p, IPlayerVisualInfo info);
|
|||
|
public delegate void OpenNpcTalkDelegate(Npc npc, int taskID, bool isTaskOpenUI, object openUIParam);
|
|||
|
|
|||
|
public delegate void ParamRefRenderListNoReturn(ref List<Renderer> outList);
|
|||
|
|
|||
|
public delegate string ParamStringRefWrapModeReturnString(string animName, ref WrapMode mode);
|
|||
|
public delegate string BindLuaCharacterDelegate(LuaCharacter character, LuaCharInitInfo initInfo);
|
|||
|
|
|||
|
public delegate bool IsTeamMemberDelegate(ulong id);
|
|||
|
|
|||
|
public delegate int FriendTypeReturnDelegate();
|
|||
|
public delegate bool IsFriendReturnDelagate(ulong id);
|
|||
|
public delegate bool IsEnemyReturnDelagate(ulong id);
|
|||
|
public delegate bool IsShieldReturnDelagate(ulong id);
|
|||
|
public delegate HolyEquip GetDressHolyEquipDelagate(int part);
|
|||
|
public delegate List<int> GetMandateSkillListDelagate();
|
|||
|
public delegate void SetFlySwordSkillDelagate(int swordSkill, int playerSkill);
|
|||
|
public delegate void ParamFloatNoReturn(float time);
|
|||
|
public delegate bool OnGameMessageDelagate(Message msg);
|
|||
|
public delegate bool ClientGMDelagate(string name);
|
|||
|
public delegate void ParamPlayerHeadNoReturn(Transform trans, int iconId, int frameId, int occ, ulong playerId, string pic, bool isShowPic);
|
|||
|
public delegate void SetPlayerLevelDelagate(Transform trans, int level, bool showLevelText);
|
|||
|
public delegate ItemBase ParmesIntIntReturnItemBase(int itemId);
|
|||
|
}
|