Commit e6723de8 authored by Nathan Lovato's avatar Nathan Lovato

Replace get_node with $ notation

parent 286ee78a
......@@ -2,8 +2,8 @@
extends Node2D
onready var pillar_spawner := get_node("PillarSpawner")
onready var score_label : Label = get_node("BackgroundLayer/ScoreLabel")
onready var pillar_spawner := $PillarSpawner
onready var score_label : Label = $BackgroundLayer/ScoreLabel
var score := 0
......
extends KinematicBody2D
onready var tween : Tween = get_node("Tween")
onready var sprite : Sprite = get_node("Sprite")
onready var collision_shape : CollisionShape2D = get_node("CollisionShape2D")
onready var tween : Tween = $Tween
onready var sprite : Sprite = $Sprite
onready var collision_shape : CollisionShape2D = $CollisionShape2D
export var gravity := 4000.0
export var flap_force := 1200.0
......
......@@ -2,8 +2,8 @@ extends StaticBody2D
signal checkpoint_reached
onready var notifier : VisibilityNotifier2D = get_node("VisibilityNotifier2D")
onready var checkpoint : Area2D = get_node("Checkpoint")
onready var notifier : VisibilityNotifier2D = $VisibilityNotifier2D
onready var checkpoint : Area2D = $Checkpoint
func _ready() -> void:
......
......@@ -9,7 +9,7 @@ and increase the Gnu's horizontal move speed
signal pillar_checkpoint_reached
onready var spawn_area := get_node("SpawnArea")
onready var spawn_area := $SpawnArea
export var spawn_interval := 400.0
......
extends Label
onready var tween : Tween = get_node("Tween")
onready var tween : Tween = $Tween
const WHITE_OPAQUE := Color('aaffffff')
const WHITE_TRANSPARENT := Color('44ffffff')
......
......@@ -5,7 +5,7 @@ Repeats a sprite hozitontally infinitely by spawning enough sprites to always
fill the view
"""
onready var spawn_position : Position2D = get_node("SpawnPosition")
onready var spawn_position : Position2D = $SpawnPosition
export var sprite_scene : PackedScene
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment