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/laser/laser.gd

13 lines
296 B
GDScript
Raw Normal View History

2020-09-06 23:02:19 +03:00
extends "../weapon.gd"
func shoot():
if !shoot_timer.is_stopped():
return
var bullet = bullet_type.instance()
bullet.position = player.position
bullet.position.y -= 8
bullet.velocity.y -= bullet_speed
bullet.damage = 0.2
get_parent().get_parent().add_child(bullet)
shoot_timer.start()