Exemple #1
0
    //10회 소환
    bool BuyHero(Image[] slot)
    {
        for (int i = 0; i < slot.Length; ++i)
        {
            ColorType();
            tenHeroSlot[i].color = color;

            eUnit = ExtensionMethod.GetSummonsUnit(eUnit);
            var data = ExtensionMethod.GetSummonsUnitTb((int)eUnit);

            if (data != null)
            {
                string changeImg = string.Format(Path.IMG, data.strName);
                tenHero[i].sprite = Resources.Load <Sprite>(changeImg) as Sprite;
            }
            else
            {
                Debug.LogError("소환 에러");
                return(false);
            }
            ++idx;
        }

        return(true);
    }
Exemple #2
0
    //1회 소환
    bool BuyHero()
    {
        ColorType();
        oneHeroBGColor.color = color;

        eUnit = ExtensionMethod.GetSummonsUnit(eUnit);
        var data = ExtensionMethod.GetSummonsUnitTb((int)eUnit);

        if (data != null)
        {
            string changeImg = string.Format(Path.IMG, data.strName);
            oneHero.sprite = Resources.Load <Sprite>(changeImg) as Sprite;

            return(true);
        }
        else
        {
            Debug.LogError("소환 에러");
            return(false);
        }
    }
Exemple #3
0
    public static eSummonsUnit GetSummonsUnit(this eSummonsUnit eSummonsUnit)
    {
        eSummonsUnit = (eSummonsUnit)Random.Range((int)eSummonsUnit.box_man, (int)eSummonsUnit.surgeon);

        return(eSummonsUnit);
    }