void CreateGame(IGameController controller) { var turnBasedArgs = new RuntimeGame.GameArgs { Controller = controller, Dispatcher = _dispatcher, GameParameters = gameParameters }; CurrentGameInstance = new RuntimeGame(turnBasedArgs); }
public void CreateGame(IGameController controller, IPlayer localPlayer, IPlayer remotePlayer) { var turnBasedArgs = new RuntimeGame.GameArgs { Controller = controller, Dispatcher = _dispatcher, GameParameters = gameParameters, LocalPlayer = localPlayer, RemotePlayer = remotePlayer }; CurrentGameInstance = new RuntimeGame(turnBasedArgs); }
public override void Setup() { base.Setup(); var args = new RuntimeGame.GameArgs { Dispatcher = Dispatcher, GameParameters = Parameters, Controller = new GameObject("Controller").AddComponent <GameController>() }; EventReceived = false; Game = new RuntimeGame(args); Game.StartGame(); }
public BattleFsm(RuntimeGame.GameArgs args, IGame game) : base(args.Controller) { Controller = args.Controller; var fsmArgs = new BattleFsmArguments { Fsm = this, Game = game, Dispatcher = args.Dispatcher, GameParameters = args.GameParameters }; var user = new UserPlayer(fsmArgs); var enemy = new AiPlayer(fsmArgs); var start = new StartBattle(fsmArgs); var end = new EndBattle(fsmArgs); RegisterState(user); RegisterState(enemy); RegisterState(start); RegisterState(end); Initialize(); }