コード例 #1
0
    private void OnPress(GameObject go, bool state)
    {
        m_isPress = state;

        ResetInterval();
        m_onLongPress = false;

        if (state)
        {
            if (!m_isOpen)
            {
                m_controller.RewindTrigger("show");

                m_controller.Play("press_sprite");
                m_controller.Play("press");
            }
            else
            {
                m_controller.RewindTrigger("hide");
            }
        }
        else
        {
            if (!m_isOpen)
            {
                m_controller.RewindTrigger("press");
                m_controller.PlayBackwardsTrigger("press_sprite");
            }
        }
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Q))
     {
         controller.PlayTrigger("AA");
     }
     if (Input.GetKeyDown(KeyCode.W))
     {
         controller.PlayBackwardsTrigger("AA");
     }
     if (Input.GetKeyDown(KeyCode.E))
     {
         controller.RewindTrigger("AA");
     }
 }