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(); } }
public void HideWindow() { CardSelectOptionsData data2 = new CardSelectOptionsData(); data2.m_Switch = false; m_DisplayCardOptionEvent.Trigger(data2); }
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); }
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); }
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); }