public void UnlockWeapon()
        {
            if (WULogin.Cash(1) < weapon.Weapon.UnlockCost || Data.Unlocked.Bool(weapon.Weapon.WeaponName))
            {
                return;
            }

            WUMoney.SpendCurrency(weapon.Weapon.UnlockCost, "dust", $"unlock,{(int)weapon_type}");
        }
        void OnEnable()
        {
            if (null == Data.Stock)
            {
                return;
            }

            //don't allow it to be unlocked twice
            blocker.SetActive(!Data.Unlocked.Bool(weapon.Weapon.WeaponName) && (WULogin.Cash(1) < weapon.Weapon.UnlockCost) || Data.Unlocked.Bool(weapon.Weapon.WeaponName));

            cost_obj.SetActive(!Data.Stock.defined.ContainsKey(weapon.Weapon.WeaponName));
            cost_text.text = $"Unlock\n{weapon.Weapon.UnlockCost}";
        }
Esempio n. 3
0
 void ShowCoins() => coins_text.text = $"{ WULogin.Cash( "dust" ) } Gold";