コード例 #1
0
    // Use this for initialization
    void Start()
    {
        gpgScript = GetComponent <GPGScript>();

        if (!PlayerPrefs.HasKey("expEarned"))
        {
            PlayerPrefs.SetFloat("expEarned", 0.0f);
        }
        if (!PlayerPrefs.HasKey("playerLevel"))
        {
            PlayerPrefs.SetInt("playerLevel", 1);
        }
        if (!PlayerPrefs.HasKey("skillPoints"))
        {
            PlayerPrefs.SetInt("skillPoints", 1);
        }
        if (!PlayerPrefs.HasKey("swipeCap"))
        {
            PlayerPrefs.SetInt("swipeCap", 20);
        }

        insufficient = GameObject.Find("sfxInsufficientGold").GetComponent <AudioSource>();

        btnPush       = GameObject.Find("sfxBtnPush").GetComponent <AudioSource>();
        btnCharacters = GameObject.Find("Characters");
        try
        {
            boolChangerScript = btnCharacters.GetComponent <animationBoolChanger>();
        }
        catch (System.Exception)
        {
        }

        if (!PlayerPrefs.HasKey("firstSkill") && !ftStep1.activeSelf)
        {
            objmainmenu.SetActive(false);
            objtopicons.SetActive(false);
            try
            { boolChangerScript.changeBoolean(); }
            catch (Exception)
            { }
            ftStep0.SetActive(true);
            back_shop.SetActive(true);
            back_shop.GetComponent <Button>().interactable = false;
        }

        //load SP and skills
        loadSPSkills();
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     Instance = this;
 }