Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
18
Task/Null-object/GDScript/null-object.gd
Normal file
18
Task/Null-object/GDScript/null-object.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready() -> void:
|
||||
var empty : Object
|
||||
var not_empty = Object.new()
|
||||
|
||||
# Compare with null.
|
||||
if empty == null:
|
||||
print("empty is null")
|
||||
else:
|
||||
print("empty is not null")
|
||||
|
||||
# C-like comparation.
|
||||
if not_empty:
|
||||
print("not_empty is not null")
|
||||
else:
|
||||
print("not_empty is null")
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue