Example #1
0
    public void OnClick_ForceAllow()
    {
        if (!Force[1].gameObject.activeInHierarchy)
        {
            return;
        }

        if (Cog < weapon.Price[SelectForce])
        {
            FX.EffectPlay(FX.SYSTEMS.SYSTEM_FAIL);
            return;
        }

        FX.EffectPlay(FX.SYSTEMS.UI_SELECT);
        GetCogs(-(int)weapon.Price[SelectForce]);
        weapon.AllowForce(SelectForce);

        for (int j = 0; j < weapon.Force_Name.Length; j++)
        {
            ForceSlots[j].text = weapon.Force_Name[j] + "(부품 " + weapon.Price[j] + ")";;

            if (weapon.CanShow[j])
            {
                ForceSlots[j].gameObject.SetActive(true);
            }
            else
            {
                ForceSlots[j].gameObject.SetActive(false);
            }
        }
        Force[0].gameObject.SetActive(false);
        Force[1].gameObject.SetActive(false);

        if (SelectWeapon == 0)
        {
            SetWeaponSprite(weapon.Down, SelectWeapon);
        }
    }