예제 #1
0
    public void Show(GameEventData eventData)
    {
        //Debug.Log("Card Selection Triggered");
        CardSelectOptionsData data = eventData.CastDataType <CardSelectOptionsData>();

        if (data == null)
        {
            return;
        }

        if (data.m_Switch)
        {
            if (!data.isCondition)
            {
                m_Display.DisplayOptions(data.unitDatas);
            }
            else
            {
                m_Display.DisplayOptions(data.conditions);
            }
        }
        else
        {
            m_Display.Hide();
        }
    }
예제 #2
0
    public void HideWindow()
    {
        CardSelectOptionsData data2 = new CardSelectOptionsData();

        data2.m_Switch = false;
        m_DisplayCardOptionEvent.Trigger(data2);
    }
예제 #3
0
    private void DisplayOptions(List <RankUpCondition> conditions)
    {
        CardSelectOptionsData data = new CardSelectOptionsData();

        data.m_Switch    = true;
        data.isCondition = true;
        data.conditions  = conditions.ToArray();

        m_DisplayCardOptionEvent.Trigger(data);
    }
예제 #4
0
    public void DisplayOptions(List <UnitData> cards)
    {
        CardSelectOptionsData data = new CardSelectOptionsData();

        data.m_Switch    = true;
        data.isCondition = false;
        data.unitDatas   = cards.ToArray();

        m_DisplayCardOptionEvent.Trigger(data);
    }
예제 #5
0
    private void HideWindow()
    {
        RankUpConditionData data = new RankUpConditionData();

        data.m_Switch = false;
        m_DisplayRankUpRequirementEvent.Trigger(data);

        CardSelectOptionsData data2 = new CardSelectOptionsData();

        data2.m_Switch = false;
        m_DisplayCardOptionEvent.Trigger(data2);
    }