Exemple #1
0
/* @return [Ray::Vector2, nil] Position in the sprite sheet */
static
VALUE ray_sprite_sheet_pos(VALUE self) {
  say_sprite *sprite = ray_rb2sprite(self);
  if (say_sprite_uses_sprite_sheet(sprite))
    return ray_vector2_to_rb(say_sprite_get_sheet_pos(sprite));
  else
    return Qnil;
}
Exemple #2
0
/* @return [Ray::Vector2] The position of the mouse */
static
VALUE ray_input_mouse_pos(VALUE self) {
  return ray_vector2_to_rb(say_input_get_mouse_pos(ray_rb2input(self)));
}
Exemple #3
0
/*
  Position of the drawable. This is thus the translation applied to it.

  @return [Ray::Vector2] The position of the drawable
*/
static
VALUE ray_drawable_pos(VALUE self) {
  return ray_vector2_to_rb(say_drawable_get_pos(ray_rb2drawable(self)));
}