예제 #1
0
    public bool CheckKeyDown()
    {
        var touch = TouchCheck.Get();

        if (!touch)
        {
            return(false);
        }
        switch (type)
        {
        case Type.UP:
            return(touch.isClickUp);

            break;

        case Type.DOWN:
            return(touch.isClickDown);

            break;

        case Type.OUT_UP:
            return(touch.isUnClickUp);

            break;

        case Type.OUT_DOWN:
            return(touch.isUnClickDown);

        default:
            Debug.Log("invalid type");
            return(false);
        }
    }
예제 #2
0
    // 터치로 고쳐야 함
    public bool CheckKey()
    {
        switch (type)
        {
        case Type.UP:
            return(TouchCheck.Get().isTouchUp);

        case Type.DOWN:
            return(TouchCheck.Get().isTouchDown);

        case Type.EVENT_UP:
            return(Input.GetKey(KeyCode.Z) && Input.GetKeyDown(KeyCode.X));

        default:
            Debug.Log("invalid type");
            return(false);
        }
    }