public GameController(IGameDataService gameDataService, IPlayerRepository playerRepository, IGameHub gameHub, IGameService gameService)
 {
     this._gameDataService  = gameDataService;
     this._playerRepository = playerRepository;
     this._gameHub          = gameHub;
     this._gameService      = gameService;
 }
 public ChoosePresidentGameState(IChoiceRoundRepository choiceRoundRepository,
                                 IChoiceRepository choiceRepository,
                                 IGameDataService gameDataService,
                                 IGameHub gameHub)
 {
     this._choiceRoundRepository = choiceRoundRepository;
     this._choiceRepository      = choiceRepository;
     this._gameDataService       = gameDataService;
     this._gameHub = gameHub;
 }
 public GameService(IPolicyRepository policyRepository,
                    IPlayerRepository playerRepository,
                    IGameDataService gameDataService,
                    IGameHub gameHub)
 {
     this._policyRepository = policyRepository;
     this._playerRepository = playerRepository;
     this._gameDataService  = gameDataService;
     this._gameHub          = gameHub;
 }
Exemple #4
0
    void Init()
    {
        IdPlayer   = -1;
        isJoin     = false;
        isGameOver = false;
        panel.SetActive(true);
        var channel = new Channel(ipServer + ":12345", ChannelCredentials.Insecure);

        _gameHub = StreamingHubClient.Connect <IGameHub, IGameHubReceiver>(channel, this);
        JoinOrLeave();
        InitBoard();
    }
Exemple #5
0
		public async Task AddGameHandler(IGameHub gameHub)
		{
			lock (this.hubs)
			{
				if (gameHub != null)
				{
					this.hubs.Add(gameHub);
				}
			}

			await this.StartGameLoop();
		}
Exemple #6
0
		public async Task RemoveGameHandler(IGameHub gameHub)
		{
			lock (this.hubs)
			{
				if (gameHub == null)
				{
					throw new ArgumentNullException("gameHub");
				}
				this.hubs.Remove(gameHub);
			}
			if (this.hubs.Count == 0)
			{
				await this.Stop();
			}
		}
Exemple #7
0
    public void ConnectChannel()
    {
        string target = $"{host.text}:{port.text}";

        Debug.Log("接続先 " + target);
        channel = new Channel(target, ChannelCredentials.Insecure);

        try
        {
            gameHub = StreamingHubClient.Connect <IGameHub, IGameHubReceiver>(this.channel, this);
            JoinSelf();
        }
        catch (System.Exception e)
        {
            Debug.Log("サーバーに接続できませんでした。");
            Debug.LogError(e);
        }
    }
Exemple #8
0
 void IHubClient.ConnectHub(Channel channel)
 {
     _streamingHub = StreamingHubClient.Connect <IGameHub, IGameHubReceiver>(channel, _receiver);
 }
Exemple #9
0
 public MainWindow(IGameHub vm)
 {
     DataContext = vm;
     InitializeComponent();
 }
Exemple #10
0
 public GamesController(IGameService gameService, IGameHub gameHub, IPlayerService playerService)
 {
     _gameService   = gameService;
     _gameHub       = gameHub;
     _playerService = playerService;
 }
 public GameController(IGameHub gameHub, IGameService gameSvc)
 {
     _gameHub = gameHub;
     _gameSvc = gameSvc;
 }