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; }
IEnumerator StartGameCallback( ) { ThrowGameMessage("Welcome", "So you're new to the streaming world, huh? \n Well, you're going to have to learn the ropes as you go along. But first thing's first, what's your <color=#00ffffff><b><i>StreamerTag</i></b></color>?"); while (CurrentMessageWindow != null) { yield return(null); } //Ask for player name GameObject playerNameWin = null; while (StreamerName == "") { if (playerNameWin == null) { playerNameWin = ( GameObject )GameObject.Instantiate(( GameObject )Resources.Load("StreamTagWin"), Vector3.zero, Quaternion.identity); playerNameWin.transform.SetParent(GameObject.FindGameObjectWithTag("Canvas").transform.GetChild(0), false); playerNameWin.transform.GetChild(0).GetComponent <InputField>( ).ActivateInputField( ); } yield return(null); } WebsiteHeaderText.text = WebsiteHeaderText.text + StreamerName; //Remove player name window GameObject.Destroy(playerNameWin); AddFollowers(2); while (bShowingMessage) { yield return(null); } //Show welcome screen ThrowGameMessage("New Followers", "Congratulations! You have your first followers! They're your parents but a follow is a follow in the world of streaming.\n As you gain followers, you will begin to notice a rise in opportunities coming your way."); while (bShowingMessage) { yield return(null); } ThrowGameMessage("Getting Games", "Games must be purchased on the <color=#ff00ffff>Vapor Marketplace</color> before you can stream. Click the button at the bottom-right corner of the screen to view the latest games on the market."); Marketplace.GetComponent <MarketplaceWindow>( ).RefreshGames( ); BtnShop.SetActive(true); while ((bShowingMessage || PlayerOwnedGames.Count == 0) || (PlayerOwnedGames.Count > 0 && Marketplace.activeInHierarchy)) { yield return(null); } ThrowGameMessage("Going Live", "As a streamer, obviously you are required to <i>actually</i> stream. To do this, start/stop your stream by pressing the 'Go Live' button at the bottom of the screen."); BtnLive.SetActive(true); yield return(null); }