Exemplo n.º 1
0
    void Start()
    {
#if !(UNITY_IOS || UNITY_ANDROID)
        postBestsBtn.SetActive(false);
#endif

        bgCtrl  = GetComponent <BackgroundController>();
        tbCtrl  = GetComponent <TableController>();
        camCtrl = GetComponent <CameraController>();

        music      = GetComponent <AudioSource> ();
        music.loop = true;

        persistorObj         = GameObject.Find("Persistor");
        audioCtrl            = persistorObj.GetComponent <AudioController>();
        AudioListener.volume = audioCtrl.CurrVolume;

        adCtrl     = GameObject.Find("Persistor").GetComponent <AdController>();
        adLaunched = false;

        // Make sure to incorporate SCALE!!!
        player      = playerObj.GetComponent <Player>();
        prevFlipAcc = Player.FlipAccuracy.none;

        highFlips        = 0;
        highScore        = 0;
        highComboOverall = 0;

        bgCtrl.OnLoad();
        tbCtrl.OnLoad();

        Reset();
    }