diff options
Diffstat (limited to 'Bullet.gd')
| -rw-r--r-- | Bullet.gd | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -9,12 +9,11 @@ var screen_size func _ready(): screen_size = get_viewport_rect().size + target = get_global_mouse_position() + velocity = global_position.direction_to(target) * speed + position += velocity * 0.05 func _physics_process(delta): - target = get_global_mouse_position() - if(Input.is_action_pressed("click") && shot == false): - velocity = global_position.direction_to(target) * speed - shot = true velocity = move_and_slide(velocity) for i in get_slide_count(): var collision = get_slide_collision(i) |
