moar waves
This commit is contained in:
parent
8344c034e4
commit
10655aed3a
18 changed files with 229 additions and 13 deletions
3
Gun.gd
3
Gun.gd
|
@ -1,10 +1,11 @@
|
|||
extends Marker2D
|
||||
|
||||
@export var bullet: PackedScene
|
||||
@export var bullet_speed = 500
|
||||
|
||||
func shoot():
|
||||
#print("Shooting")
|
||||
var node = bullet.instantiate()
|
||||
node.global_position = global_position
|
||||
node.linear_velocity = Vector2(500, 0).rotated(global_rotation)
|
||||
node.linear_velocity = Vector2(bullet_speed, 0).rotated(global_rotation)
|
||||
$/root/Node2D.add_child(node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue