Exemplo n.º 1
0
    void SelectGameMode()
    {
        int realNbOfPlayers = currentIndex + 2;

        //set the numebr of players in this game
        GameController.SetNumberOfPlayers(realNbOfPlayers);

        menuNav.StartGame();

        level.SpawnPlayers(realNbOfPlayers);

        currentIndex          = 0;
        selectionBox.position = selections[currentIndex].position;
    }
Exemplo n.º 2
0
    void Start()
    {
        menuNavigation = IoC.Resolve <MenuNavigation>();

        Observable.EveryUpdate()
        .Where(x => KeyCode.R.IsPressed())
        .Take(1)
        .Subscribe(x => menuNavigation.StartGame())
        .AddTo(this);

        Observable.EveryUpdate()
        .Where(x => KeyCode.Escape.IsPressed())
        .Take(1)
        .Subscribe(x =>
        {
            Cursor.visible   = true;
            Cursor.lockState = CursorLockMode.None;
            menuNavigation.NavigateToMainMenu();
        })
        .AddTo(this);
    }
Exemplo n.º 3
0
 private void StartGame()
 {
     menuNavigation.StartGame();
 }