aboutsummaryrefslogtreecommitdiffstats
path: root/KinematicBody2D.gd
diff options
context:
space:
mode:
authorLMBishop <13875753+LMBishop@users.noreply.github.com>2022-10-29 18:00:46 +0100
committerLMBishop <13875753+LMBishop@users.noreply.github.com>2022-10-29 18:00:46 +0100
commite91f2c9f403522b22b730f777baa354b9a9cfedc (patch)
tree947707b5af368199471f56752322c30f93f1fbad /KinematicBody2D.gd
parent9c6e6217916972d05da5a5072ea935f8189ea825 (diff)
Fix bullets
Diffstat (limited to 'KinematicBody2D.gd')
-rw-r--r--KinematicBody2D.gd7
1 files changed, 1 insertions, 6 deletions
diff --git a/KinematicBody2D.gd b/KinematicBody2D.gd
index 03dd45f..3be3afc 100644
--- a/KinematicBody2D.gd
+++ b/KinematicBody2D.gd
@@ -18,15 +18,10 @@ func get_input():
velocity = velocity.normalized() * speed
func _physics_process(delta):
-
-
-
get_input()
globals.playerPos = global_position
velocity = move_and_slide(velocity)
if Input.is_action_just_pressed("click"):
var obj = spawn_object.instance()
obj.position = get_position()
- obj.position.x -= 500
- obj.position.y -= 250
- add_child(obj)
+ get_owner().add_child(obj)