godot declare variable return type code example
Example 1: godot declare variable return type
To declare the return type of a function, use -> :
func heal(amount: int) -> void:
Example 2: godot declare variable type
To declare a variable's type, use : :
var health: int = 0