Godot Notifications - mgea/godot GitHub Wiki

Notificaciones

Overridable functions / Funciones virtuales

Godot dispone de una funciones "virtuales" que inicialmente no hacen nada por defecto y se pueden redefinir.

Las más importantes son:

  • _ready(): Called when the node is added to the scene tree

  • _init(): Called when the node is added to the scene tree

  • _process(delta): Called every frame.

  • _physics_process(delta): Called every physics frame. Physics runs at a fixed frame rate to ensure consistency in the simulation.

  • _input(event): Called for every input event.

  • _unhandled_input(event): Called for every input event not consumed by _input().

  • _enter_tree(): Called when the node enters the scene tree, before _ready().

Solo existen para sobreescribirse por el diseñador. Inicialmente aparecen así

# Called when the object is created / similar to _ready
func _init():
    pass

# Called every time the node enters the scene tree.
func _enter_tree():
	pass

# Called when both the node and its children have entered the scene tree.
func _ready():
	pass

# Called when the node is about to leave the scene tree, after all its
# children received the _exit_tree() callback.
func _exit_tree():
	pass

Referencia