Exemplo n.º 1
0
    void Start()
    {
        interAdScript       = GameObject.Find("InterstitialAdObject").GetComponent <InterstitialAdScript>();
        hignhScoreText.text = "En Yüksek Skor: " + PlayerPrefs.GetInt("high");
        panel.SetActive(false);
        //eger renk seceneklerinde birinci renk degisirse renk kodu buraya elle girilmeli
        if (PlayerPrefs.GetFloat("r") == 0 || PlayerPrefs.GetFloat("g") == 0 || PlayerPrefs.GetFloat("b") == 0)
        {
            Background.GetComponent <Image>().color        = new Vector4(164, 154, 154, 1);
            motherColorButton.GetComponent <Image>().color = new Vector4(164, 154, 154, 1);
        }
        else
        {
            Background.GetComponent <Image>().color        = new Vector4(PlayerPrefs.GetFloat("r"), PlayerPrefs.GetFloat("g"), PlayerPrefs.GetFloat("b"), 1);
            motherColorButton.GetComponent <Image>().color = new Vector4(PlayerPrefs.GetFloat("r"), PlayerPrefs.GetFloat("g"), PlayerPrefs.GetFloat("b"), 1);
        }
        //Debug.Log("A"+PlayerPrefs.GetInt("texture"));


        if (PlayerPrefs.GetInt("texture") == 0)
        {
            PlayerPrefs.SetInt("texture", 1);
        }
        Background.GetComponent <Image>().sprite = textures[PlayerPrefs.GetInt("texture") - 1];

        frontButton.SetActive(true);
        backButton.SetActive(false);

        slider.GetComponent <Slider>().value    = PlayerPrefs.GetFloat("music");
        sliderTwo.GetComponent <Slider>().value = PlayerPrefs.GetFloat("musicTwo");

        translate.GetComponent <translateMotor>().translator();
        //PlayerPrefs.DeleteAll();
    }
Exemplo n.º 2
0
    void Awake()
    {
        // if the singleton hasn't been initialized yet
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
        }

        instance = this;
        DontDestroyOnLoad(this.gameObject);
    }
Exemplo n.º 3
0
    void Start()
    {
        //PlayerPrefs.DeleteAll();
        if (PlayerPrefs.GetInt("adFree", 0) != 0)
        {
            adFree = PlayerPrefs.GetInt("adFree");
        }

        initData();
        initView();
        rv      = GetComponent <rewardVideo>();
        inter   = GetComponent <InterstitialAdScript>();
        reinter = GetComponent <ReInterstitialScript>();
        StartCoroutine("waitAsecond");
        Time.timeScale = 0;
    }