Exemplo n.º 1
0
 public void BuySkill()
 {
     if (ExpManager.instance.EXP >= s_cost)
     {
         ExpManager.instance.RemoveEXP(s_cost);
         PlayerPrefs.SetInt(s_name + "_e", 1);
         LockBtn.SetActive(false);
         CostText.SetActive(false);
         ui.SUI.CurSkill.sprite = s_sprite.sprite;
         Cost.GetComponent <GameObject>().SetActive(false);
     }
     else
     {
         StartCoroutine(WarningDisplay());
     }
 }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        ui = FindObjectOfType <UIManager>();
        PlayerPrefs.GetInt(s_name, 0);
        PlayerPrefs.GetInt(s_name + "_e", 0);

        if (PlayerPrefs.GetInt(s_name) == 1)
        {
            Equip = true;
        }

        if (Unlock || PlayerPrefs.GetInt(s_name + "_e") == 1)
        {
            LockBtn.SetActive(false);
            CostText.SetActive(false);
        }

        PlayerPrefs.GetInt("EquipSkillNumber", -1);
    }