Exemplo n.º 1
0
    protected override void TriggerExitEvent()
    {
        //Debug.Log("Trigger off");
        CardInfoData data = new CardInfoData();

        data.m_Switch = false;

        m_Event.Trigger(data);
    }
Exemplo n.º 2
0
    protected override void TriggerEnterEvent()
    {
        //.Log("Trigger On");
        CardInfoData data = new CardInfoData();

        data.m_Data   = GetComponent <Unit>().m_Data;
        data.m_Switch = true;

        m_Event.Trigger(data);
    }
Exemplo n.º 3
0
    protected override void TriggerRightClickEvent()
    {
        if (m_RightClickEvent == null)
        {
            return;
        }

        //Debug.Log("Triggered"+m_Event);
        CardInfoData data = new CardInfoData();

        data.m_Data   = unit.m_Data;
        data.m_Switch = true;
        m_RightClickEvent.Trigger(data);
    }
    protected override void TriggerRightClickEvent()
    {
        //Debug.Log("Right Click");
        if (m_RightClickEvent == null)
        {
            return;
        }

        //Debug.Log("Display ["+ cardDisplay.m_CardData + "]");
        CardInfoData data = new CardInfoData();

        data.m_Data   = cardDisplay.m_CardData;
        data.m_Switch = true;

        m_RightClickEvent.Trigger(data);

        //Debug.Log("Triggered [" + m_RightClickEvent + "]");
    }
Exemplo n.º 5
0
    public void Trigger(GameEventData eventData)
    {
        //Debug.Log("Receive Trigger");
        CardInfoData data = eventData.CastDataType <CardInfoData>();

        if (data == null)
        {
            return;
        }

        SetActive(data.m_Switch);

        if (m_active)
        {
            m_Display.Display(data.m_Data);
        }

        //Debug.Log("Active" + m_active);
        //Debug.Log("Data" + data.m_Data);
    }