예제 #1
0
파일: sprite.c 프로젝트: Spooner/ray
/* @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;
}
예제 #2
0
파일: input.c 프로젝트: Spooner/ray
/* @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)));
}
예제 #3
0
파일: drawable.c 프로젝트: Mon-Ouie/ray
/*
  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)));
}