class

Godot::Node2D

Inherits Godot::CanvasItem < Godot::Node < Godot::Object < Reference < Object

A 2D game object with position, rotation, and scale transform.

Constructors

new(pointer : Pointer(Void) = Pointer(Void).null)
Source

Instance methods

apply_scale(ratio : Vector2) : Void
Source
get_angle_to(point : Vector2) : Float64
Source
get_global_position
Source
get_global_rotation
Source
get_global_rotation_degrees
Source
get_global_scale
Source
get_global_skew
Source
get_position
Source
get_relative_transform_to_parent(parent : Node) : Transform2D
Source
get_rotation
Source
get_rotation_degrees
Source
get_scale
Source
get_skew
Source
global_position
Source
global_position=(v : Vector2)
Source
global_rotation
Source
global_rotation=(v : Float32)
Source
global_rotation_degrees
Source
global_rotation_degrees=(v : Float32)
Source
global_scale
Source
global_scale=(v : Vector2)
Source
global_skew
Source
global_skew=(v : Float32)
Source
global_transform
Source
global_transform=(v : Transform2D)
Source
global_translate(offset : Vector2) : Void
Source
look_at(point : Vector2) : Void
Source
move_local_x(delta : Float64, scaled : Bool) : Void
Source
move_local_y(delta : Float64, scaled : Bool) : Void
Source
position
Source
position=(v : Vector2)
Source
rotate(radians : Float64) : Void
Source
rotation
Source
rotation=(v : Float32)
Source
rotation_degrees
Source
rotation_degrees=(v : Float32)
Source
scale
Source
scale=(v : Vector2)
Source
set_global_position(position : Vector2) : Void
Source
set_global_rotation(radians : Float64) : Void
Source
set_global_rotation_degrees(degrees : Float64) : Void
Source
set_global_scale(scale : Vector2) : Void
Source
set_global_skew(radians : Float64) : Void
Source
set_global_transform(xform : Transform2D) : Void
Source
set_position(position : Vector2) : Void
Source
set_rotation(radians : Float64) : Void
Source
set_rotation_degrees(degrees : Float64) : Void
Source
set_scale(scale : Vector2) : Void
Source
set_skew(radians : Float64) : Void
Source
set_transform(xform : Transform2D) : Void
Source
skew
Source
skew=(v : Float32)
Source
to_global(local_point : Vector2) : Vector2
Source
to_local(global_point : Vector2) : Vector2
Source
transform
Source
transform=(v : Transform2D)
Source
translate(offset : Vector2) : Void
Source
visible

Property visible getter

Source
visible=(v : Bool)
Source
visible?
Source