コード例 #1
0
    public void on_new_qte(NewQTEEvent e)
    {
        if (e.m_qte_data.m_type == QTEType.Mash)
        {
            // Our Type
            m_listen = true;
            GameEvent <QTEEndEvent> .Register(on_qte_end);

            transform.GetComponentInParent <CanvasGroup>().alpha = 1.0f;
            GameEvent <NewQTEEvent> .Unregister(on_new_qte);
        }
    }
コード例 #2
0
    public void play_qte(QTEData qte_data)
    {
        Debug.Assert(m_current_qte == null);
        m_current_qte = qte_data;

        switch (m_current_qte.m_type)
        {
        case QTEType.Mash:
            m_mash_amount = 0.0f;
            break;

        default:
            Debug.LogError(string.Format("No QTE Play for Type {0}", m_current_qte.m_type.ToString()));
            break;
        }

        NewQTEEvent e = new NewQTEEvent();

        e.m_qte_data = m_current_qte;
        GameEvent <NewQTEEvent> .Post(e);
    }