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)
|
||||
1
scenes/weapon/minigun/minigun.gd.uid
Normal file
1
scenes/weapon/minigun/minigun.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bxedwccs1lj6j
|
||||
7
scenes/weapon/minigun/minigun.tscn
Normal file
7
scenes/weapon/minigun/minigun.tscn
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://c6lpcf6nk7f3s"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://btyuxgfn12p1y" path="res://scenes/weapon/weapon.tscn" id="1_dt38b"]
|
||||
[ext_resource type="Script" uid="uid://bxedwccs1lj6j" path="res://scenes/weapon/minigun/minigun.gd" id="2_u46t0"]
|
||||
|
||||
[node name="Minigun" instance=ExtResource("1_dt38b")]
|
||||
script = ExtResource("2_u46t0")
|
||||
Loading…
Add table
Add a link
Reference in a new issue