Esempio n. 1
0
 /// <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);
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
    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();
    }
Esempio n. 4
0
        public async Task <IHttpActionResult> Start([FromBody] StartGameView model)
        {
            MainGameView view = await _gameService.NewGame(model);

            return(Ok(view));
        }
Esempio n. 5
0
    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();
    }