working spder bomb

This commit is contained in:
Maddo 2025-02-28 11:17:28 +01:00
commit f1f40a91dd
17 changed files with 400 additions and 105 deletions

View file

@ -0,0 +1,34 @@
[gd_scene load_steps=7 format=3 uid="uid://cvctgw8eo2f7e"]
[ext_resource type="Script" uid="uid://b3h7b30kerf60" path="res://Scripts/Interactables/ItemPickup.cs" id="1_bdsed"]
[ext_resource type="Resource" uid="uid://dhbltvgsa3g88" path="res://Resources/Items/Spider_Bomb_Pickup.tres" id="2_bdsed"]
[ext_resource type="Texture2D" uid="uid://huo14jdekj6n" path="res://Sprites/Bullets/spiderbomb.png" id="3_bdsed"]
[sub_resource type="CircleShape2D" id="CircleShape2D_6vv2s"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fyf8h"]
atlas = ExtResource("3_bdsed")
region = Rect2(0, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_qfvur"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_fyf8h")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="SpiderBomb" type="Area2D" groups=["Interactable"]]
collision_layer = 4
collision_mask = 2
script = ExtResource("1_bdsed")
LootTable = [ExtResource("2_bdsed")]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_6vv2s")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_qfvur")

View file

@ -1,23 +1,28 @@
[gd_scene load_steps=3 format=3 uid="uid://dfbmny3s4rili"]
[gd_scene load_steps=5 format=3 uid="uid://dfbmny3s4rili"]
[ext_resource type="Script" uid="uid://c4molirtle8a0" path="res://Scripts/Components/AutodeleteParticle.cs" id="1_rk44q"]
[sub_resource type="Gradient" id="Gradient_xc6bb"]
colors = PackedColorArray(0, 0.45098, 0.886275, 1, 0.729412, 1, 1, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_hkx2s"]
gradient = SubResource("Gradient_xc6bb")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_f8iyl"]
particle_flag_disable_z = true
radial_velocity_min = -2.23517e-05
radial_velocity_max = 30.38
radial_velocity_max = 145.49
gravity = Vector3(0, 0, 0)
linear_accel_min = -23.2
linear_accel_max = -2.23517e-06
scale_min = 0.5
scale_max = 0.5
color = Color(0.054902, 0.494118, 1, 1)
color_ramp = SubResource("GradientTexture1D_hkx2s")
[node name="IceBulletParticle" type="GPUParticles2D"]
emitting = false
amount = 4
process_material = SubResource("ParticleProcessMaterial_f8iyl")
lifetime = 0.4
one_shot = true
process_material = SubResource("ParticleProcessMaterial_f8iyl")
script = ExtResource("1_rk44q")
LifeTime = 1.0
AutoStart = true

View file

@ -0,0 +1,58 @@
[gd_scene load_steps=8 format=3 uid="uid://64ax2lj77sr1"]
[ext_resource type="Script" uid="uid://dsa4b75hdig8p" path="res://Scripts/Bullet.cs" id="1_nrcj1"]
[ext_resource type="Texture2D" uid="uid://huo14jdekj6n" path="res://Sprites/Bullets/spiderbomb.png" id="2_nrcj1"]
[sub_resource type="CircleShape2D" id="CircleShape2D_jxptd"]
radius = 2.23607
[sub_resource type="AtlasTexture" id="AtlasTexture_lhjit"]
atlas = ExtResource("2_nrcj1")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_ibnjy"]
atlas = ExtResource("2_nrcj1")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_w1jch"]
atlas = ExtResource("2_nrcj1")
region = Rect2(32, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_co0jb"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_lhjit")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ibnjy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_w1jch")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="Bullet" type="Area2D" groups=["bullets"]]
collision_layer = 8
collision_mask = 87
script = ExtResource("1_nrcj1")
Speed = 200.0
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_jxptd")
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_co0jb")
autoplay = "default"
frame = 1
frame_progress = 0.375255
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"]

View file

@ -264,6 +264,7 @@ shape = SubResource("CircleShape2D_e6woi")
debug_color = Color(1, 0.00817797, 0.0443347, 0.42)
[node name="Weapon" parent="." node_paths=PackedStringArray("Muzzle") instance=ExtResource("9_wblq0")]
scale = Vector2(1.38995, 1.96064)
WeaponData = ExtResource("9_84o8f")
BulletScene = ExtResource("2_ov36d")
Muzzle = NodePath("../Muzzle")
@ -281,9 +282,9 @@ MaxResource = 25.0
[node name="ShieldParticles" type="GPUParticles2D" parent="."]
emitting = false
amount = 32
process_material = SubResource("ParticleProcessMaterial_hmqi5")
lifetime = 0.4
one_shot = true
process_material = SubResource("ParticleProcessMaterial_hmqi5")
[connection signal="area_entered" from="InteractionController" to="." method="_on_interaction_controller_area_entered"]
[connection signal="area_exited" from="InteractionController" to="." method="_on_interaction_controller_area_exited"]

File diff suppressed because one or more lines are too long