first Prototype
This commit is contained in:
parent
89503407e7
commit
c887a2168c
78 changed files with 2494 additions and 2 deletions
14
scenes/weapon/minigun/minigun.gd
Normal file
14
scenes/weapon/minigun/minigun.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class_name Minigun extends "res://scenes/weapon/weapon.gd"
|
||||
|
||||
@onready var bullet = preload("res://scenes/bullet/bulletMinigun/bulletMinigun.tscn" )
|
||||
|
||||
func attack():
|
||||
if cooldownTimer.is_stopped():
|
||||
print(getSpread())
|
||||
spawnBullet()
|
||||
cooldownTimer.start(cooldown)
|
||||
|
||||
func spawnBullet():
|
||||
var newBullet = bullet.instantiate()
|
||||
get_tree().get_first_node_in_group("bulletPool").add_child(newBullet)
|
||||
newBullet.spawn(bulletPoint.global_position, get_parent().get_parent().rotation + getSpread(), damage, range, penetration)
|
||||
Loading…
Add table
Add a link
Reference in a new issue