inching towards better class inheritence and multiplayer compatibility
This commit is contained in:
8
Scenes/Projectiles/explosive_projectile.tscn
Normal file
8
Scenes/Projectiles/explosive_projectile.tscn
Normal file
@ -0,0 +1,8 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://7f4dfphgiswr"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c8qjlgam6wuo0" path="res://Scenes/Projectiles/projectile.tscn" id="1_136w8"]
|
||||
[ext_resource type="Script" path="res://Scripts/Projectiles/explosive_projectile.gd" id="2_3adg2"]
|
||||
|
||||
[node name="ExplosiveProjectile" instance=ExtResource("1_136w8")]
|
||||
script = ExtResource("2_3adg2")
|
||||
explosion_range = 3.0
|
10
Scenes/Projectiles/homing_projectile.tscn
Normal file
10
Scenes/Projectiles/homing_projectile.tscn
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://di2wwvkv4wov1"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://7f4dfphgiswr" path="res://Scenes/Projectiles/explosive_projectile.tscn" id="1_it3tw"]
|
||||
[ext_resource type="Script" path="res://Scripts/Projectiles/homing_projectile.gd" id="2_etdxg"]
|
||||
|
||||
[node name="HomingProjectile" instance=ExtResource("1_it3tw")]
|
||||
script = ExtResource("2_etdxg")
|
||||
acceleration = 30.0
|
||||
max_speed = 15.0
|
||||
explosion_range = 6.0
|
24
Scenes/Projectiles/projectile.tscn
Normal file
24
Scenes/Projectiles/projectile.tscn
Normal file
@ -0,0 +1,24 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c8qjlgam6wuo0"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Projectiles/projectile.gd" id="1_k4v4y"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_fgj4t"]
|
||||
radius = 0.2
|
||||
|
||||
[node name="Projectile" type="RigidBody3D" node_paths=PackedStringArray("collision_shape")]
|
||||
collision_layer = 0
|
||||
collision_mask = 5
|
||||
gravity_scale = 0.0
|
||||
max_contacts_reported = 1
|
||||
contact_monitor = true
|
||||
script = ExtResource("1_k4v4y")
|
||||
collision_shape = NodePath("CollisionShape3D")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("SphereShape3D_fgj4t")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
9
Scenes/Projectiles/status_applying_projectile.tscn
Normal file
9
Scenes/Projectiles/status_applying_projectile.tscn
Normal file
@ -0,0 +1,9 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://beq6rn0babncg"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://7f4dfphgiswr" path="res://Scenes/Projectiles/explosive_projectile.tscn" id="1_atrjq"]
|
||||
[ext_resource type="Script" path="res://Scripts/Projectiles/status_applying_projectile.gd" id="2_4p44n"]
|
||||
|
||||
[node name="StatusApplyingProjectile" instance=ExtResource("1_atrjq")]
|
||||
max_contacts_reported = 0
|
||||
script = ExtResource("2_4p44n")
|
||||
status_stats = null
|
7
Scenes/Towers/hitscan_tower.tscn
Normal file
7
Scenes/Towers/hitscan_tower.tscn
Normal file
@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dumiyjlnea4gq"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bvqu1heobgboe" path="res://Scenes/Towers/tower.tscn" id="1_60g1i"]
|
||||
[ext_resource type="Script" path="res://Scripts/Towers/hitscan_tower.gd" id="2_t6bcd"]
|
||||
|
||||
[node name="HitscanTower" instance=ExtResource("1_60g1i")]
|
||||
script = ExtResource("2_t6bcd")
|
8
Scenes/Towers/projectile_tower.tscn
Normal file
8
Scenes/Towers/projectile_tower.tscn
Normal file
@ -0,0 +1,8 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://t0b32qb8eub2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bvqu1heobgboe" path="res://Scenes/Towers/tower.tscn" id="1_yagdr"]
|
||||
[ext_resource type="Script" path="res://Scripts/Towers/projectile_tower.gd" id="2_fqi5p"]
|
||||
|
||||
[node name="ProjectileTower" instance=ExtResource("1_yagdr")]
|
||||
script = ExtResource("2_fqi5p")
|
||||
projectile_scene = null
|
48
Scenes/Towers/tower.tscn
Normal file
48
Scenes/Towers/tower.tscn
Normal file
@ -0,0 +1,48 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bvqu1heobgboe"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Towers/tower.gd" id="1_u8bfo"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_vk4a8"]
|
||||
resource_name = "shoot"
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_cebsq"]
|
||||
_data = {
|
||||
"shoot": SubResource("Animation_vk4a8")
|
||||
}
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_42byu"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1ucq4"]
|
||||
transparency = 1
|
||||
cull_mode = 1
|
||||
shading_mode = 0
|
||||
albedo_color = Color(1, 0, 0.415686, 0.223529)
|
||||
|
||||
[node name="Tower" type="Node3D" node_paths=PackedStringArray("animator", "pitch_model", "yaw_model", "range_indicator")]
|
||||
script = ExtResource("1_u8bfo")
|
||||
animator = NodePath("AnimationPlayer")
|
||||
pitch_model = NodePath("Pitch")
|
||||
yaw_model = NodePath("Yaw")
|
||||
range_indicator = NodePath("CSGSphere3D")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_cebsq")
|
||||
}
|
||||
|
||||
[node name="Pitch" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("BoxMesh_42byu")
|
||||
|
||||
[node name="Yaw" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("BoxMesh_42byu")
|
||||
|
||||
[node name="MinimapIcon" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
layers = 4
|
||||
|
||||
[node name="CSGSphere3D" type="CSGSphere3D" parent="."]
|
||||
visible = false
|
||||
radius = 10.0
|
||||
radial_segments = 16
|
||||
rings = 16
|
||||
material = SubResource("StandardMaterial3D_1ucq4")
|
@ -4,16 +4,11 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dlqnhs8or4ik2" path="res://Assets/Textures/cardhand.png" id="1_d5oo3"]
|
||||
[ext_resource type="Texture2D" uid="uid://buf8t5gc7iw3a" path="res://Assets/TextureAtlases/rarityborders.tres" id="3_pclfx"]
|
||||
|
||||
[node name="Node2D" type="Node2D" node_paths=PackedStringArray("rarity_sprite", "title_text", "damage_text_text", "damage_text", "fire_rate_text_text", "fire_rate_text", "range_text_text", "range_text")]
|
||||
[node name="Node2D" type="Node2D" node_paths=PackedStringArray("rarity_sprite", "title_text", "description")]
|
||||
script = ExtResource("1_2cfmh")
|
||||
rarity_sprite = NodePath("Sprite2D2")
|
||||
title_text = NodePath("Title")
|
||||
damage_text_text = NodePath("DamageText")
|
||||
damage_text = NodePath("Damage")
|
||||
fire_rate_text_text = NodePath("FireRateText")
|
||||
fire_rate_text = NodePath("FireRate")
|
||||
range_text_text = NodePath("RangeText")
|
||||
range_text = NodePath("Range")
|
||||
description = NodePath("Description")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
@ -38,56 +33,13 @@ theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "spider queen"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="DamageText" type="Label" parent="."]
|
||||
offset_left = 30.0
|
||||
offset_top = 65.0
|
||||
offset_right = 132.0
|
||||
offset_bottom = 91.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Damage: "
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Damage" type="Label" parent="."]
|
||||
offset_left = 78.0
|
||||
offset_top = 65.0
|
||||
offset_right = 180.0
|
||||
offset_bottom = 91.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "45"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="FireRateText" type="Label" parent="."]
|
||||
offset_left = 31.0
|
||||
offset_top = 89.0
|
||||
offset_right = 133.0
|
||||
offset_bottom = 115.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Fire Rate: "
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="FireRate" type="Label" parent="."]
|
||||
offset_left = 77.0
|
||||
offset_top = 90.0
|
||||
offset_right = 179.0
|
||||
offset_bottom = 116.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "3"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="RangeText" type="Label" parent="."]
|
||||
offset_left = 44.0
|
||||
offset_top = 111.0
|
||||
offset_right = 146.0
|
||||
offset_bottom = 137.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Range: "
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Range" type="Label" parent="."]
|
||||
offset_left = 87.0
|
||||
offset_top = 111.0
|
||||
offset_right = 189.0
|
||||
offset_bottom = 137.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "55"
|
||||
horizontal_alignment = 1
|
||||
[node name="Description" type="RichTextLabel" parent="."]
|
||||
offset_left = 66.0
|
||||
offset_top = 42.0
|
||||
offset_right = 167.0
|
||||
offset_bottom = 178.0
|
||||
theme_override_colors/default_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/normal_font_size = 11
|
||||
bbcode_enabled = true
|
||||
text = "In here goes some card text that really be quite long sometimes if you're not really really careful to describe the card's effects concisely"
|
||||
fit_content = true
|
||||
|
26
Scenes/Weapons/hitscan_weapon.tscn
Normal file
26
Scenes/Weapons/hitscan_weapon.tscn
Normal file
@ -0,0 +1,26 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://difwo7wlyqr3h"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b7nargdyg28fj" path="res://Scenes/Weapons/weapon.tscn" id="1_s865l"]
|
||||
[ext_resource type="Script" path="res://Scripts/Weapons/hitscan_weapon.gd" id="2_nyich"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1ucq4"]
|
||||
transparency = 1
|
||||
cull_mode = 1
|
||||
shading_mode = 0
|
||||
albedo_color = Color(1, 0, 0.415686, 0.223529)
|
||||
|
||||
[node name="HitscanWeapon" node_paths=PackedStringArray("raycast", "range_debug_indicator") instance=ExtResource("1_s865l")]
|
||||
script = ExtResource("2_nyich")
|
||||
raycast = NodePath("RayCast3D")
|
||||
range_debug_indicator = NodePath("CSGSphere3D")
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="." index="2"]
|
||||
target_position = Vector3(0, 0, -1)
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CSGSphere3D" type="CSGSphere3D" parent="." index="3"]
|
||||
visible = false
|
||||
radius = 4.104
|
||||
radial_segments = 16
|
||||
rings = 16
|
||||
material = SubResource("StandardMaterial3D_1ucq4")
|
8
Scenes/Weapons/projectile_weapon.tscn
Normal file
8
Scenes/Weapons/projectile_weapon.tscn
Normal file
@ -0,0 +1,8 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bqdllitxbbpyp"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b7nargdyg28fj" path="res://Scenes/Weapons/weapon.tscn" id="1_nbhwa"]
|
||||
[ext_resource type="Script" path="res://Scripts/Weapons/projectile_weapon.gd" id="2_5ekyi"]
|
||||
|
||||
[node name="ProjectileWeapon" instance=ExtResource("1_nbhwa")]
|
||||
script = ExtResource("2_5ekyi")
|
||||
projectile_scene = null
|
8
Scenes/Weapons/status_applying_weapon.tscn
Normal file
8
Scenes/Weapons/status_applying_weapon.tscn
Normal file
@ -0,0 +1,8 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://nrdexcyatika"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://difwo7wlyqr3h" path="res://Scenes/Weapons/hitscan_weapon.tscn" id="1_uolyx"]
|
||||
[ext_resource type="Script" path="res://Scripts/Weapons/status_applying_weapon.gd" id="2_iq7bw"]
|
||||
|
||||
[node name="StatusApplyingWeapon" instance=ExtResource("1_uolyx")]
|
||||
script = ExtResource("2_iq7bw")
|
||||
status_stats = null
|
54
Scenes/Weapons/weapon.tscn
Normal file
54
Scenes/Weapons/weapon.tscn
Normal file
@ -0,0 +1,54 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://b7nargdyg28fj"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Weapons/weapon.gd" id="1_yo2gh"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_5krlx"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D:texture:region")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Rect2(0, 0, 64, 64)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_0rgpe"]
|
||||
resource_name = "shoot"
|
||||
length = 0.15
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D:texture:region")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.15),
|
||||
"transitions": PackedFloat32Array(0, 0),
|
||||
"update": 0,
|
||||
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_fs82p"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_5krlx"),
|
||||
"shoot": SubResource("Animation_0rgpe")
|
||||
}
|
||||
|
||||
[node name="Weapon" type="Node3D" node_paths=PackedStringArray("animator")]
|
||||
script = ExtResource("1_yo2gh")
|
||||
animator = NodePath("AnimationPlayer")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
layers = 2
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_fs82p")
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://csufsbi64asau"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://hnfa76d6tdi" path="res://Assets/Textures/target_icon.png" id="1_r4a3f"]
|
||||
|
||||
[node name="Node3D" type="Sprite3D"]
|
||||
sorting_offset = 20.0
|
||||
pixel_size = 0.003
|
||||
billboard = 1
|
||||
no_depth_test = true
|
||||
fixed_size = true
|
||||
texture_filter = 0
|
||||
texture = ExtResource("1_r4a3f")
|
Reference in New Issue
Block a user