Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        isPopup = true;
        ego     = FindObjectOfType(typeof(EsophagusGameOver)) as EsophagusGameOver;
        fp      = FindObjectOfType(typeof(FingerPopup)) as FingerPopup;
        fp.setPaused();
        Time.timeScale = 0;                                                             // pause the game

        statsStyle                  = new GUIStyle();                                   // create a new style
        statsStyle.font             = (Font)Resources.Load("Fonts/JandaManateeSolid");  // set the font
        statsStyle.normal.textColor = Color.white;                                      // set the font color
        statsStyle.fontSize         = (int)(16f / 768f * Screen.height);                // set the font relative size

        statsStyle2                  = new GUIStyle();                                  // create a new style
        statsStyle2.font             = (Font)Resources.Load("Fonts/JandaManateeSolid"); // set the font
        statsStyle2.normal.textColor = Color.white;                                     // set the font color
        statsStyle2.fontSize         = (int)(22f / 768f * Screen.height);               // set the font relative size

        timesCoughed = PlayerPrefs.GetInt("MouthStats_timesCoughed");
        sentence     = new string[3] {
            "You helped the chef swallow!\n",
            "You helped the chef swallow almost without choking!\n",
            "You helped the chef swallow without choking!\n"
        };
    }
Exemplo n.º 2
0
	// Use this for initialization
	void Start ()
	{
		flaps = GameObject.Find ("Flaps");									// find the reference to the flaps
		flap = flaps.GetComponent<openFlap>();											// find the script on the flaps
		ego = FindObjectOfType(typeof(EsophagusGameOver)) as EsophagusGameOver;

		startTime = Time.time;
		timeStamp = Time.time;
		swipePopupStatus = 0;
		swipeCount = 0;
		swipingDown.SetActive (false);
		swipingUp.SetActive (false);
		notPaused = true;
	}