diff options
| author | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2022-10-29 18:00:46 +0100 |
|---|---|---|
| committer | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2022-10-29 18:00:46 +0100 |
| commit | e91f2c9f403522b22b730f777baa354b9a9cfedc (patch) | |
| tree | 947707b5af368199471f56752322c30f93f1fbad /Bullet.gd | |
| parent | 9c6e6217916972d05da5a5072ea935f8189ea825 (diff) | |
Fix bullets
Diffstat (limited to 'Bullet.gd')
| -rw-r--r-- | Bullet.gd | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -5,27 +5,9 @@ var velocity = Vector2() var target = Vector2.ZERO #var player = load("") var shot = false; -func get_input(): - velocity = Vector2() - if Input.is_action_pressed("right"): - velocity.x += 1 - if Input.is_action_pressed("left"): - velocity.x -= 1 - if Input.is_action_pressed("down"): - velocity.y += 1 - if Input.is_action_pressed("up"): - velocity.y -= 1 - - velocity = velocity.normalized() * speed - - func _physics_process(delta): - - - - target = get_global_mouse_position() if(Input.is_action_pressed("click") && shot == false): velocity = global_position.direction_to(target) * speed |
