Beispiel #1
0
    //checks if button is pressed
    public static bool GetPressed(int btn_id)
    {
        if (blockInput)
        {
            return(false);
        }
        switch (btn_id)
        {
        case LEFT:
            return(bLeft.GetPointerDown() || bDL.GetPointerDown() || bUL.GetPointerDown());

        case RIGHT:
            return(bRight.GetPointerDown() || bDR.GetPointerDown() || bUR.GetPointerDown());

        case UP:
            return(bUp.GetPointerDown() || bUL.GetPointerDown() || bUR.GetPointerDown());

        case DOWN:
            return(bDown.GetPointerDown() || bDL.GetPointerDown() || bDR.GetPointerDown());

        default:
            return(false);
        }
    }