/// <summary> /// Fixer la partie courante /// </summary> /// <param name="game">Modele du jeu</param> public void setCurrentGame(Diaballik.Game game) { currentGame = game; currentGame.addObserverEnd(this); CurrentView = new MainGameView(this, game); notifyObserState(Utils.Properties.STATE_GAME.GAME); }
public async Task <MainGameView> NewGame(StartGameView view) { //TEST var mainView = new MainGameView(); mainView.Players.Add(new PlayerMainGameViewItem { Name = view.PlayerName, Id = Guid.NewGuid() }); return(mainView); }
protected override void Awake() { m_Instance = this; base.Awake(); int index = Random.Range(0, m_HandAssetNames.Count); m_Hand1Assets = m_HandAssetNames[index]; m_HandAssetNames.RemoveAt(index); index = Random.Range(0, m_HandAssetNames.Count); m_Hand2Assets = m_HandAssetNames[index]; m_HandAssetNames.RemoveAt(index); CameraController.Instance.Reset(); }
public async Task <IHttpActionResult> Start([FromBody] StartGameView model) { MainGameView view = await _gameService.NewGame(model); return(Ok(view)); }