first Prototype

This commit is contained in:
Exobyt 2025-08-02 12:27:49 +02:00
parent 89503407e7
commit c887a2168c
78 changed files with 2494 additions and 2 deletions

View file

@ -0,0 +1,14 @@
class_name Railgun extends "res://scenes/weapon/weapon.gd"
@onready var bullet = preload("res://scenes/bullet/bulletRailgun/bulletRailgun.tscn")
func attack():
if cooldownTimer.is_stopped():
spawnBullet()
cooldownTimer.start(cooldown)
func spawnBullet():
var newBullet = bullet.instantiate()
newBullet.spawn(bulletPoint.global_position, get_parent().get_parent().rotation, damage, penetration)
get_tree().get_first_node_in_group("bulletPool").add_child(newBullet)

View file

@ -0,0 +1 @@
uid://dth0orslxriyp

View file

@ -0,0 +1,13 @@
[gd_scene load_steps=3 format=3 uid="uid://bm2e5fwynwur8"]
[ext_resource type="PackedScene" uid="uid://btyuxgfn12p1y" path="res://scenes/weapon/weapon.tscn" id="1_lb4uk"]
[ext_resource type="Script" uid="uid://dth0orslxriyp" path="res://scenes/weapon/railgun/railgun.gd" id="2_ur8td"]
[node name="Railgun" instance=ExtResource("1_lb4uk")]
script = ExtResource("2_ur8td")
damage = 10
cooldown = 10.0
penetration = 5
[node name="cooldownTimer" parent="." index="0"]
wait_time = 10.0