Exemplo n.º 1
0
    public float _timeLeft = TimeValue; //how much time is left?

    // Use this for initialization
    void Start()
    {
        //set basics
        _flowScript      = FindObjectOfType <GameFlowScript>();
        _trackingManager = FindObjectOfType <TrackingManager>();
        _timeLeft        = TimeDebug;

        //if not in debug mode, use non-debug values
        if (!_debugMode)
        {
            controls  = _flowScript.controlSchemeToSet;
            _timeLeft = TimeValue;
        }

        //freeze the game until the player clicks to start it
        Time.timeScale = 0;

        //prevent the screen from timing out or rotating
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        Screen.orientation  = ScreenOrientation.Portrait;

        //get the camera, and zoom it out so the player can see everything
        Camera mainCam = FindObjectOfType <Camera>();

        while (mainCam.WorldToScreenPoint(new Vector3(24, 40, 24)).x > Screen.width)
        {
            mainCam.orthographicSize = mainCam.orthographicSize + 0.5f;
        }

        SetTutorialText();
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     _flowScript = FindObjectOfType <GameFlowScript>();
 }