Exemple #1
0
    void onEggOpenSucess(EventBase ev)
    {
        EggUIEvent evt = ev as EggUIEvent;

        if (evt == null)
        {
            return;
        }

        playSucessEffect(evt.eggType);
        createItems(evt.eggType, evt.items);
        updateForm();
    }
Exemple #2
0
    /// <summary>
    /// 开蛋成功结果;
    /// </summary>
    /// <param name="idx"></param>
    public void OpenEggSucess(EggType et, List <role_egg_item_items> items)
    {
        Pdm.AddEggOpenTimes(et);

        if (et == EggType.Normal)
        {
            ResetTimeCounter(EggType.Normal);
        }
        else
        {
            if (GetSecondsByEggId(et) <= 0)
            {
                ResetTimeCounter(et);
            }
        }

        EggUIEvent ev = new EggUIEvent(EggUIEvent.EGG_OPEN_SUCESS);

        ev.eggType = et;
        ev.items   = items;

        EventSystem.Instance.PushEvent(ev);
    }