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"); } } }
// 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"); } }