This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues/pull-requests.
evospace/weapons/double/double.gd

21 lines
509 B
GDScript

extends "../weapon.gd"
func shoot():
if !shoot_timer.is_stopped():
return
var bullet1 = bullet_type.instance()
bullet1.position = player.position
bullet1.position.y -= 3
bullet1.position.x -= 7.5
bullet1.velocity.y -= bullet_speed
get_tree().get_root().add_child(bullet1)
var bullet2 = bullet_type.instance()
bullet2.position = player.position
bullet2.position.y -= 3
bullet2.position.x += 7.5
bullet2.velocity.y -= bullet_speed
get_tree().get_root().add_child(bullet2)
shoot_timer.start()