示例#1
0
    // Use this for initialization
    void Start()
    {
        TotalCoinsText.text = PlayerPrefs.GetInt("TotalCoins").ToString();

        cameraScroll = cam.GetComponent <CameraScroll>();
        pauseLevel   = UIManager.GetComponent <PauseLevel>();
        timerScript  = UIManager.GetComponent <TimerScript>();
        //advertismentScript = UIManager.GetComponent<AdvertisementScript>();
        muteAudio            = UIManager.GetComponent <MuteAudio>();
        levelCharacteristics = UIManager.GetComponent <LevelCharacteristics>();

        if (levelCharacteristics.isGravitySwitch)
        {
            jumpDirection = Vector2.left;
            levelCharacteristics.GravitySwitch();
        }



        coinArray      = GameObject.FindGameObjectsWithTag("Coin");
        coinListLength = coinArray.Length;
        for (int x = 0; x < coinListLength; x++)
        {
            coinList.Add(coinArray[x]);
        }



        playerPosition = player.transform.position; camPosition = cam.transform.position;
        music.Pause();
    }
示例#2
0
 public void DoMuteAudio() => MuteAudio?.Invoke();