public override void UpdateFullPackage(string pkgUrl) { this.JavaCall("updateApk", new object[] { pkgUrl, GameConfigInfo.GetInstance().dictExtendConfig.ContainsKey("isGooglePlay") }); }
private void Start(GameConfigInfo gameConfigInfo) { Log.Info($"[_gameId:{GameId}] Game creation is happening in a few seconds!!!"); _game = SabberStoneConverter.CreateGame(Player1, Player2, gameConfigInfo); Log.Info($"[_gameId:{GameId}] Game creation done!"); _game.StartGame(); }
public static Game CreateGame(UserInfo player1, UserInfo player2, GameConfigInfo gameConfigInfo) { var gameConfig = GameConfigBuilder.Create() .SetPlayer1(player1.AccountName, player1.DeckData) .SetPlayer2(player2.AccountName, player2.DeckData) .SkipMulligan(gameConfigInfo.SkipMulligan) .Shuffle(gameConfigInfo.Shuffle) .FillDecks(gameConfigInfo.FillDecks) .Logging(gameConfigInfo.Logging) .History(gameConfigInfo.History) .RandomSeed(gameConfigInfo.RandomSeed) .Build(); return(new Game(gameConfig)); }
private static int GetInstance(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 0); GameConfigInfo instance = GameConfigInfo.GetInstance(); ToLua.PushObject(L, instance); result = 1; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }
internal void InvitationReply(bool state, GameData gameData) { if (!state) { Stop(); return; } var userInfoData = UserById(gameData.PlayerId); userInfoData.UserState = UserState.InGame; if (Player1.UserState == UserState.InGame && Player2.UserState == UserState.InGame) { GameConfigInfo gameConfigInfo = new GameConfigInfo() { SkipMulligan = true, Shuffle = true, FillDecks = true, Logging = true, History = true, RandomSeed = _random.Next() }; Start(gameConfigInfo); Player1.GameConfigInfo = gameConfigInfo; Player2.GameConfigInfo = gameConfigInfo; //var serializerSetting = new JsonSerializerSettings { ContractResolver = new TypeOnlyContractResolver<List<UserInfo>>() }; // we send over opponend user info which is currently not reduced and has all available informations SendGameData(Player1, MsgType.InGame, true, GameDataType.Initialisation, JsonConvert.SerializeObject(new List <UserInfo> { Player1.GetUserInfoClone(), Player2.GetUserInfoClone() })); SendGameData(Player2, MsgType.InGame, true, GameDataType.Initialisation, JsonConvert.SerializeObject(new List <UserInfo> { Player1.GetUserInfoClone(), Player2.GetUserInfoClone() })); SendHistoryToPlayers(); SendOptionsOrChoicesToPlayers(); } }
private static int get_getPayChannel(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); GameConfigInfo gameConfigInfo = (GameConfigInfo)obj; string getPayChannel = gameConfigInfo.getPayChannel; LuaDLL.lua_pushstring(L, getPayChannel); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index getPayChannel on a nil value"); } return(result); }
private static int get_setSafeQuestion(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); GameConfigInfo gameConfigInfo = (GameConfigInfo)obj; string setSafeQuestion = gameConfigInfo.setSafeQuestion; LuaDLL.lua_pushstring(L, setSafeQuestion); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index setSafeQuestion on a nil value"); } return(result); }
private static int get_testHouTaiServicesUrl(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); GameConfigInfo gameConfigInfo = (GameConfigInfo)obj; string testHouTaiServicesUrl = gameConfigInfo.testHouTaiServicesUrl; LuaDLL.lua_pushstring(L, testHouTaiServicesUrl); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index testHouTaiServicesUrl on a nil value"); } return(result); }
private static int get_payHistory(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); GameConfigInfo gameConfigInfo = (GameConfigInfo)obj; string payHistory = gameConfigInfo.payHistory; LuaDLL.lua_pushstring(L, payHistory); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index payHistory on a nil value"); } return(result); }
private static int get_isAppStore(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); GameConfigInfo gameConfigInfo = (GameConfigInfo)obj; bool isAppStore = gameConfigInfo.isAppStore; LuaDLL.lua_pushboolean(L, isAppStore); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index isAppStore on a nil value"); } return(result); }
private static int get_smallChannelSimpleName(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); GameConfigInfo gameConfigInfo = (GameConfigInfo)obj; string smallChannelSimpleName = gameConfigInfo.smallChannelSimpleName; LuaDLL.lua_pushstring(L, smallChannelSimpleName); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index smallChannelSimpleName on a nil value"); } return(result); }
private static int get_userType(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); GameConfigInfo gameConfigInfo = (GameConfigInfo)obj; int userType = gameConfigInfo.userType; LuaDLL.lua_pushinteger(L, userType); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index userType on a nil value"); } return(result); }
private static int get_increUpdatePrefix(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); GameConfigInfo gameConfigInfo = (GameConfigInfo)obj; string increUpdatePrefix = gameConfigInfo.increUpdatePrefix; LuaDLL.lua_pushstring(L, increUpdatePrefix); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index increUpdatePrefix on a nil value"); } return(result); }
private static int get_dictExtendConfig(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); GameConfigInfo gameConfigInfo = (GameConfigInfo)obj; Dictionary <string, object> dictExtendConfig = gameConfigInfo.dictExtendConfig; ToLua.PushObject(L, dictExtendConfig); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index dictExtendConfig on a nil value"); } return(result); }
private static int _CreateHummingbird_Model_GameConfigInfo(IntPtr L) { int result; try { if (LuaDLL.lua_gettop(L) == 0) { GameConfigInfo o = new GameConfigInfo(); ToLua.PushObject(L, o); result = 1; } else { result = LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Hummingbird.Model.GameConfigInfo.New"); } } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }
public bool NeedCallSDK() { return(!GameConfigInfo.GetInstance().channelCode.Equals("youai01") && !GameConfigInfo.GetInstance().channelCode.Equals("youaiios01")); }