Esempio n. 1
0
    void Start()
    {
        CheckOffsets();

        //But I think you're just mad 'cause you're singleton.
        if (!instance) instance = this;
        else if (instance != this) Destroy(this);

        timer = Timer.instance;
        timer.setTimerStartValue(timerStartValue);
        timer.Restart ();
        timer.Pause();

        isStartScreen = true;

        score = Score.instance;

        screenSize = new Vector2 (Screen.width, Screen.height);
        screenSize = Camera.main.ScreenToWorldPoint (screenSize);

        FindAudioSources ();
        cam = GameObject.Find ("Main Camera").GetComponent<Camera>();

        shakeRate = initialShakeRate;
    }