Exemplo n.º 1
0
    private void ShowWishResult(ScWishWish result)
    {
        if (result == null || result.result > 1)
        {
            if (result != null)
            {
                moduleGlobal.ShowMessage(9403, result.result - 2);
            }
            return;
        }


        m_showing = true;

        if (m_itemList == null)
        {
            m_itemList = new List <PItem2>();
        }
        else
        {
            m_itemList.Clear();
        }

        foreach (var item in result.items)
        {
            m_itemList.Add(item.item);
        }

        result.CopyTo(ref m_msgCache);

        m_btnWish2.transform.parent.SafeSetActive(false);
        if (m_rewardShow.gameObject.activeSelf)
        {
            m_rewardShow.Clear();
            moduleGlobal.OnGlobalTween(true, 1);
            m_ta2.Play(true);
            m_rewardShow.Show(m_itemList);
            m_showing = false;
            return;
        }

        m_skipAnimation = false;
        if (m_npc)
        {
            m_npc.stateMachine.TranslateToID(CREATURE_STATE_WISH);
            m_btnSkipAnimation.SafeSetActive(true);
            HighlightNpc();
        }
        else
        {
            m_rewardShow.Show(m_itemList);
        }
    }
Exemplo n.º 2
0
 void _Packet(ScWishWish p)
 {
     DispatchModuleEvent(EventWishResult, p);
 }