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;
    }
Beispiel #2
0
        public static void changeScreen(UserControl current, string next)
        {
            //tmp is set to the form that this control is on
            Form tmp = current.FindForm();

            tmp.Controls.Remove(current);
            UserControl ns = null;

            switch (next)
            {
            case "GameScreen":
                ns = new GameScreen();
                break;

            case "InstructionScreen":
                ns = new InstructionScreen();
                break;

            case "MenuScreen":
                ns = new MenuScreen();
                break;

            case "OptionScreen":
                ns = new OptionScreen();
                break;
            }

            ns.Size     = new Size(controlWidth, controlHeight);
            ns.Location = startCentre;
            tmp.Controls.Add(ns);
            ns.Focus();
        }
 /// <summary>
 /// Show Game instructions
 /// </summary>
 public void ShowInstructions( )
 {
     StartGameScreen.SetActive(false);
     InstructionScreen.SetActive(true);
     PauseScreen.SetActive(false);
     GameHUD.SetActive(false);
     GameInfoHUD.SetActive(false);
 }
    /// <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;
    }
    /// <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;
    }
    /// <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( ));
    }
Beispiel #7
0
        private void SetupScreens()
        {
            _homeScreen = HomeScreen.Instance;
            _homeScreen.Initialize(Content);

            _cinematicScreen = CinematicScreen.Instance;
            _cinematicScreen.Initialize(Content);

            _instructionScreen = InstructionScreen.Instance;
            _instructionScreen.Initialize(Content);

            _mainScreen = MainScreen.Instance;
            _mainScreen.Initialize(Content);

            _gameOverScreen = GameOverScreen.Instance;
            _gameOverScreen.Initialize(Content);
        }
Beispiel #8
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);
        }
    }
Beispiel #9
0
 //controlls which screen is online
 private void ScreenController(int i)
 {
     arrowScreen.SetActive(0 == i);
     InstructionScreen.SetActive(1 == i);
     GameOverScreen.SetActive(2 == i);
 }
Beispiel #10
0
 void Awake()
 {
     S = this;
 }