Exemplo n.º 1
0
    void Start( )
    {
        //Initiate data
        GameService.InitDocument( );

        //Show the start game screen
        StartGameScreen.SetActive(true);   // ON
        InstructionScreen.SetActive(false);
        Marketplace.SetActive(false);
        PauseScreen.SetActive(false);
        GameHUD.SetActive(false);
        GameInfoHUD.SetActive(false);

        BtnLive.SetActive(false);
        BtnShop.SetActive(false);

        //Set initial values
        SocialLevel   = 0;
        VerbalLevel   = 0;
        SkillLevel    = 0;
        HardwareLevel = 0;

        Followers        = 0;
        Viewers          = 0;
        Money            = 60.00f;
        StreamerName     = "";
        TotalStreamTime  = 16.0f;
        StartCash        = 0;
        GameMessageList  = new List <KeyValuePair <string, string> >( );
        PlayerOwnedGames = new List <Game>( );

        //Set game state
        CurrentGameState = GameState.MENU;
        bGameStarted     = false;
    }
Exemplo n.º 2
0
 /// <summary>
 /// Show Game instructions
 /// </summary>
 public void ShowInstructions( )
 {
     StartGameScreen.SetActive(false);
     InstructionScreen.SetActive(true);
     PauseScreen.SetActive(false);
     GameHUD.SetActive(false);
     GameInfoHUD.SetActive(false);
 }
Exemplo n.º 3
0
    /// <summary>
    /// Show Game instructions
    /// </summary>
    public void ShowStartScreen( )
    {
        StartGameScreen.SetActive(true);
        InstructionScreen.SetActive(false);
        Marketplace.SetActive(false);
        PauseScreen.SetActive(false);
        GameHUD.SetActive(false);
        GameInfoHUD.SetActive(false);

        CurrentGameState = GameState.MENU;
    }
Exemplo n.º 4
0
    /// <summary>
    /// Pause / unpause the game
    /// </summary>
    public void PauseGame( )
    {
        bGamePaused = !bGamePaused;

        StartGameScreen.SetActive(false);
        InstructionScreen.SetActive(false);
        PauseScreen.SetActive(bGamePaused);
        GameHUD.SetActive(!bGamePaused);
        GameInfoHUD.SetActive(!bGamePaused);

        CurrentGameState = bGamePaused ? GameState.PAUSE : GameState.GAME;
    }
Exemplo n.º 5
0
    /// <summary>
    /// Start game and go to game hud & screen
    /// </summary>
    public void StartGame( )
    {
        //show the game hud
        StartGameScreen.SetActive(false);
        InstructionScreen.SetActive(false);
        PauseScreen.SetActive(false);
        GameHUD.SetActive(true);     // ON
        GameInfoHUD.SetActive(true); // ON

        CurrentGameState = GameState.GAME;

        StartCoroutine(StartGameCallback( ));
    }
Exemplo n.º 6
0
    public void InfoLevel2Selected()
    {
        AudioSource audio = gameObject.GetComponent <AudioSource>();

        audio.Play();
        StartCoroutine(Wait());
        Level.SetActive(false);
        if (Shaft_with_spokes)
        {
            Shaft_with_spokes.SetActive(false);
        }
        InfoButton.SetActive(false);
        Pause_Menu.SetActive(false);
        PauseButton.SetActive(false);
        if (InstructionScreen)
        {
            InstructionScreen.SetActive(true);
            ObjectDescription.SetActive(true);
            LevelBackground.SetActive(false);
        }
    }
Exemplo n.º 7
0
 //controlls which screen is online
 private void ScreenController(int i)
 {
     arrowScreen.SetActive(0 == i);
     InstructionScreen.SetActive(1 == i);
     GameOverScreen.SetActive(2 == i);
 }