Ejemplo n.º 1
0
        public static int Axis10(GAME_AXIS input, float Senctive)
        {
            float value = Axis(input);

            if (value < -Senctive)
            {
                return(-1);
            }
            if (value > Senctive)
            {
                return(1);
            }
            return(0);
        }
Ejemplo n.º 2
0
        public static float Axis(GAME_AXIS input)
        {
            switch (input)
            {
            case GAME_AXIS.MOVE:
                bool left  = Button(GAME_BUTTON.LEFT, BUTTON_ACTION.HOLD);
                bool right = Button(GAME_BUTTON.RIGHT, BUTTON_ACTION.HOLD);
                return(left && right ? 0 : left ? -1 : right ? 1 : 0);

            case GAME_AXIS.UPDN:
                bool up   = Button(GAME_BUTTON.UP, BUTTON_ACTION.HOLD);
                bool down = Button(GAME_BUTTON.DOWN, BUTTON_ACTION.HOLD);
                return(up && down ? 0 : down ? -1 : up ? 1 : 0);
            }
            return(0);
        }
Ejemplo n.º 3
0
 public static int Axis10(GAME_AXIS input)
 {
     return(Axis10(input, 0.2f));
 }
Ejemplo n.º 4
0
        public static float Axis(GAME_AXIS input, float Senctive)
        {
            float value = Axis(input);

            return(value < -Senctive || value > Senctive ? value : 0);
        }