initial commit
This commit is contained in:
commit
e446938ba7
74 changed files with 3212 additions and 0 deletions
11
Gun.gd
Normal file
11
Gun.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends Marker2D
|
||||
|
||||
@export var bullet: PackedScene
|
||||
|
||||
func shoot():
|
||||
print("Shooting")
|
||||
var node = bullet.instantiate()
|
||||
node.global_position = global_position
|
||||
node.linear_velocity = Vector2(500, 0).rotated(global_rotation)
|
||||
print(node.linear_velocity)
|
||||
$/root/Node2D.add_child(node)
|
Loading…
Add table
Add a link
Reference in a new issue