static int InitBallHolder(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); GameMatch_1ON1 obj = (GameMatch_1ON1)LuaScriptMgr.GetNetObjectSelf(L, 1, "GameMatch_1ON1"); obj.InitBallHolder(); return(0); }
static int EnableMatchTips(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); GameMatch_1ON1 obj = (GameMatch_1ON1)LuaScriptMgr.GetNetObjectSelf(L, 1, "GameMatch_1ON1"); bool o = obj.EnableMatchTips(); LuaScriptMgr.Push(L, o); return(1); }
static int GameUpdate(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); GameMatch_1ON1 obj = (GameMatch_1ON1)LuaScriptMgr.GetNetObjectSelf(L, 1, "GameMatch_1ON1"); IM.Number arg0 = (IM.Number)LuaScriptMgr.GetNetObject(L, 2, typeof(IM.Number)); obj.GameUpdate(arg0); return(0); }
static int OnGameBegin(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); GameMatch_1ON1 obj = (GameMatch_1ON1)LuaScriptMgr.GetNetObjectSelf(L, 1, "GameMatch_1ON1"); fogs.proto.msg.GameBeginResp arg0 = (fogs.proto.msg.GameBeginResp)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.GameBeginResp)); obj.OnGameBegin(arg0); return(0); }
static int OnMatchStateChange(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 3); GameMatch_1ON1 obj = (GameMatch_1ON1)LuaScriptMgr.GetNetObjectSelf(L, 1, "GameMatch_1ON1"); MatchState arg0 = (MatchState)LuaScriptMgr.GetNetObject(L, 2, typeof(MatchState)); MatchState arg1 = (MatchState)LuaScriptMgr.GetNetObject(L, 3, typeof(MatchState)); obj.OnMatchStateChange(arg0, arg1); return(0); }
static int _CreateGameMatch_1ON1(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 1) { GameMatch.Config arg0 = (GameMatch.Config)LuaScriptMgr.GetNetObject(L, 1, typeof(GameMatch.Config)); GameMatch_1ON1 obj = new GameMatch_1ON1(arg0); LuaScriptMgr.PushObject(L, obj); return(1); } else { LuaDLL.luaL_error(L, "invalid arguments to method: GameMatch_1ON1.New"); } return(0); }
public bool CreateNewMatch(GameMatch.Config config) { if (mPlayerManager != null) { mPlayerManager.RemoveAllPlayers(); } if (mCurMatch != null) { mCurMatch = null; } //涂鸦数据 GameMatch.Config.TeamMember mainRole = config.MainRole; if (mainRole != null) { RoleInfo role = MainPlayer.Instance.GetRole2(uint.Parse(mainRole.id)); if (role != null && role.badge_book_id != 0) { BadgeBook book = MainPlayer.Instance.badgeSystemInfo.GetBadgeBookByBookId(role.badge_book_id); mainRole.badgeBook = book; } for (int i = 0; i < config.NPCs.Count; ++i) { GameMatch.Config.TeamMember teamMate = config.NPCs [i]; if (teamMate != null) { RoleInfo roleTeammate = MainPlayer.Instance.GetRole2(uint.Parse(teamMate.id)); if (roleTeammate != null && roleTeammate.badge_book_id != 0) { BadgeBook book = MainPlayer.Instance.badgeSystemInfo.GetBadgeBookByBookId(roleTeammate.badge_book_id); teamMate.badgeBook = book; } } } } GameMatch match = null; switch (config.type) { case GameMatch.Type.ePVP_1PLUS: case GameMatch.Type.ePVP_3On3: match = new GameMatch_PVP(config); break; case GameMatch.Type.e1On1: case GameMatch.Type.eCareer1On1: match = new GameMatch_1ON1(config); break; case GameMatch.Type.ePractise: match = new GameMatch_Practise(config); break; case GameMatch.Type.eReady: match = new GameMatch_Ready(config); break; case GameMatch.Type.eFreePractice: match = new GameMatch_FreePractice(config); break; case GameMatch.Type.ePracticeVs: match = new GameMatch_PracticeVs(config); break; case GameMatch.Type.e3On3: case GameMatch.Type.eCareer3On3: match = new GameMatch_3ON3(config); break; case GameMatch.Type.eAsynPVP3On3: match = new GameMatch_AsynPVP3ON3(config); break; case GameMatch.Type.e3AIOn3AI: match = new GameMatch_3AION3AI(config); break; case GameMatch.Type.eReboundStorm: match = new GameMatch_ReboundStorm(config); break; case GameMatch.Type.eBlockStorm: match = new GameMatch_BlockStorm(config); break; case GameMatch.Type.eUltimate21: match = new GameMatch_Ultimate21(config); break; case GameMatch.Type.eMassBall: match = new GameMatch_MassBall(config); break; case GameMatch.Type.eGrabZone: match = new GameMatch_GrabZone(config); break; case GameMatch.Type.eGrabPoint: match = new GameMatch_GrabPoint(config); break; case GameMatch.Type.eBullFight: match = new GameMatch_BullFight(config); break; case GameMatch.Type.ePractice1V1: match = new GameMatch_Practice1V1(config); break; case GameMatch.Type.eQualifyingNewerAI: match = new GameMatch_QualifyingNewerAI(config); break; case GameMatch.Type.eLadderAI: match = new GameMatch_LadderAI(config); break; } if (match == null) { Debug.LogError("Unsupported match type is detected when creating a new match."); return(false); } mCurMatch = match; mCurMatch.Build(); return(true); }
public bool CreateNewMatch(string configName, ulong session_id = 0ul, GameMatch.Type matchType = GameMatch.Type.eNone) { if (mPlayerManager != null) { mPlayerManager.RemoveAllPlayers(); } if (mCurMatch != null) { mCurMatch = null; } GameMatch.Config config = new GameMatch.Config(); GameSystem.Instance.gameMatchConfig.LoadMatchConfig(ref config, GameMatch.Type.eNone); GameSystem.Instance.gameMatchConfig.LoadMatchConfig(ref config, matchType); config.session_id = session_id; if (config.MainRole == null) { config.MainRole = new GameMatch.Config.TeamMember(); config.MainRole.id = (MainPlayer.Instance.CaptainID).ToString(); } GameMatch match = null; switch (config.type) { case GameMatch.Type.e1On1: match = new GameMatch_1ON1(config); break; case GameMatch.Type.eReady: object o = LuaScriptMgr.Instance.GetLuaTable("_G")["TestScene"]; if (o != null) { config.sceneId = (uint)(double)o; } match = new GameMatch_Ready(config); break; case GameMatch.Type.eFreePractice: match = new GameMatch_FreePractice(config); break; case GameMatch.Type.e3On3: match = new GameMatch_3ON3(config); break; case GameMatch.Type.eGuide: GameMatch_Guide.SetConfig(ref config); match = new GameMatch_Guide(config); break; case GameMatch.Type.ePVP_1PLUS: case GameMatch.Type.ePVP_3On3: //match = new GameMatch_PVP(config); match = new GameMatch_PVP(config); break; } if (match == null) { Debug.LogError("Unsupported match type is detected when creating a new match."); return(false); } mCurMatch = match; mCurMatch.Build(); return(true); }