arrows now get deleted when offscreen
This commit is contained in:
parent
2d3fc72ebe
commit
b53c776021
4 changed files with 21 additions and 8 deletions
6
game.gd
6
game.gd
|
@ -28,15 +28,21 @@ onready var a_shoot = preload("res://audio/sounds/a_egg_shoot.ogg")
|
|||
#Objects
|
||||
onready var block_text = preload("res://objects/hud/blocktext.tscn")
|
||||
|
||||
#Instances a node
|
||||
func instance_node(node:PackedScene,x:float,y:float,parent):
|
||||
var Instance = node.instance()
|
||||
Instance.global_position = Vector2(x,y)
|
||||
parent.add_child(Instance)
|
||||
|
||||
#Plays a sound
|
||||
func play_sound(snd,player):
|
||||
player.set_stream(snd)
|
||||
player._set_playing(true)
|
||||
|
||||
#Get position in sectors
|
||||
func get_sector(pos):
|
||||
return (pos / resolution).floor()
|
||||
|
||||
func _process(delta):
|
||||
#Restart scene
|
||||
if Input.is_action_just_pressed("debug_restart"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue