Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR GDSCRIPT

GDScript typed variables

# Method 1
var score: int = 0
var remaining_fuel: float = 99.9
var paused: bool = false
var player_name: String = ""

# Method 2 (inferring the type)
var my_int := 8
var size := 32.6
var running := true
var name := ""
 
PREVIOUS NEXT
Tagged: #GDScript #typed #variables
ADD COMMENT
Topic
Name
8+8 =