Class: Ray::Input

Inherits:
Object
  • Object
show all
Defined in:
ext/input.c

Instance Method Summary collapse

Instance Method Details

#holding?(key) ⇒ true, false

Returns True if the given key is being held.

Parameters:

  • key (Integer)

    A key

Returns:

  • (true, false)

    True if the given key is being held



35
36
37
38
39
# File 'ext/input.c', line 35

static
VALUE ray_input_holding(VALUE self, VALUE key) {
  return say_input_is_holding(ray_rb2input(self), NUM2INT(key)) ?
    Qtrue : Qfalse;
}

#mouse_posRay::Vector2

Returns The position of the mouse.

Returns:



42
43
44
45
# File 'ext/input.c', line 42

static
VALUE ray_input_mouse_pos(VALUE self) {
  return ray_vector2_to_rb(say_input_get_mouse_pos(ray_rb2input(self)));
}