Esempio n. 1
0
    public void UpdateView(GachaData gachaData)
    {
        this.gachaData = gachaData;

        iconCurrencyGacha1.sprite  = LoadResourceController.GetMoneyIcon(gachaData.GetRequireGacha1().resId);
        iconCurrencyGacha10.sprite = LoadResourceController.GetMoneyIcon(gachaData.GetRequireGacha10().resId);

        priceGacha1.text  = gachaData.GetRequireGacha1().resNumber.ToString();
        priceGacha10.text = gachaData.GetRequireGacha10().resNumber.ToString();
        timeGacha1.text   = "";

        background.sprite = LoadResourceController.GetGachaBackground(gachaData.id);
        iconGacha.sprite  = LoadResourceController.GetGachaIcon(gachaData.id);

        SetupFreeGacha();
    }
Esempio n. 2
0
    public void OnClickGacha1()
    {
        var canGacha10 = gachaData != null && playerMoney.IsEnoughMoney(gachaData.GetRequireGacha1().GetResource());

        if (canGacha10)
        {
            OnSuccess(gachaData.GetGacha());
        }
    }