private GameContext _createGameContext(CardDeck customerDeck, CardDeck ingredientDeck, PlayerState[] playerList) { GameContext context = GameContext.Create(GameMode.ONLINE, playerList); context.isMasterClient = PhotonNetwork.isMasterClient; context.ingredientDeck = ingredientDeck; context.customerDeck = customerDeck; return(context); }
private GameContext _createGameContext() { // int randomSeed = Environment.TickCount; // CardDeck customerDeck = CardDeck.FromFile("Decks/CustomerDeck"); // customerDeck.Shuffle(randomSeed); // CardDeck ingredientDeck = CardDeck.FromFile("Decks/IngredientDeck"); // ingredientDeck.Shuffle(randomSeed); // PlayerState[] playerStateList = _passPlaySetupController.GetPlayerList(); GameContext context = GameContext.Create(GameMode.PASS_AND_PLAY); // context.isMasterClient = true; // context.ingredientDeck = ingredientDeck; // context.customerDeck = customerDeck; return(context); }
public static async Task Launch(string productName, string configFilePath) { Configuration config = ConfigurationReader.Read(configFilePath); config.ProductName = productName; var window = new DesktopWindow(config.WindowTitle, (uint)config.WindowWidth, (uint)config.WindowHeight); GameContext ctx = GameContext.Create(window, config).Result; { try { await ctx.Run(); } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine(e.StackTrace); } } }
public void Init(GameStateMachine stateMachine, object changeStateData) { Debug.Log("Entering In GamePlay State"); _stateMachine = stateMachine; Tween introTween = Singleton.instance.gui.screenFader.FadeIn(1.0f); introTween.SetDelay(0.25f); GameContext context = Singleton.instance.sessionFlags.gameContext; if (context == null) { context = GameContext.Create(GameMode.PASS_AND_PLAY); } _gameModeController = createGameModeController(context.gameMode); _gameModeController.AddListener(GameEventType.GAME_OVER, onGameOver); _gameModeController.Start(context); }