repeater and compound projectile

This commit is contained in:
Rendo 2025-07-30 05:27:20 +05:00
commit 3d9f0f7423
9 changed files with 235 additions and 42 deletions

View file

@ -1,24 +1,23 @@
[gd_scene load_steps=3 format=3 uid="uid://c1ig40gtdcb60"]
[gd_scene load_steps=5 format=3 uid="uid://pf8sq0bk3epn"]
[ext_resource type="PackedScene" uid="uid://pf8sq0bk3epn" path="res://scenes/projectiles/cucumber_projectile_part.tscn" id="1_3auks"]
[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="1_iyfw1"]
[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_12o6v"]
[sub_resource type="GDScript" id="GDScript_3auks"]
resource_name = "cucumber"
script/source = "extends Node2D
[sub_resource type="AtlasTexture" id="AtlasTexture_h74iy"]
atlas = ExtResource("2_12o6v")
region = Rect2(24, 88, 7, 13)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_iyfw1"]
radius = 6.0
height = 24.0
func _ready() -> void:
await get_tree().process_frame
get_child(0).reparent(get_parent())
get_child(0).reparent(get_parent())
queue_free()
"
[node name="CucumberProjectile" instance=ExtResource("1_iyfw1")]
_speed = 5.0
_damage = 25
[node name="CucumberProjectileScene" type="Node2D"]
script = SubResource("GDScript_3auks")
[node name="Sprite" parent="." index="0"]
rotation = -1.5708
texture = SubResource("AtlasTexture_h74iy")
[node name="CucumberProjectile" parent="." instance=ExtResource("1_3auks")]
rotation = 1.5708
[node name="CucumberProjectile2" parent="." instance=ExtResource("1_3auks")]
rotation = 4.71239
[node name="CollisionShape2D" parent="." index="1"]
shape = SubResource("CapsuleShape2D_iyfw1")

View file

@ -0,0 +1,13 @@
[gd_scene load_steps=3 format=3 uid="uid://c1ig40gtdcb60"]
[ext_resource type="PackedScene" uid="uid://pf8sq0bk3epn" path="res://scenes/projectiles/cucumber_projectile.tscn" id="1_3auks"]
[ext_resource type="Script" uid="uid://j6nq8w2n8532" path="res://scripts/projectiles/CompoundProjectile.cs" id="1_pmbxx"]
[node name="CucumberProjectileScene" type="Node2D"]
script = ExtResource("1_pmbxx")
[node name="CucumberProjectile" parent="." instance=ExtResource("1_3auks")]
rotation = 1.5708
[node name="CucumberProjectile2" parent="." instance=ExtResource("1_3auks")]
rotation = 4.71239

View file

@ -1,23 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://pf8sq0bk3epn"]
[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="1_iyfw1"]
[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_12o6v"]
[sub_resource type="AtlasTexture" id="AtlasTexture_h74iy"]
atlas = ExtResource("2_12o6v")
region = Rect2(24, 88, 7, 13)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_iyfw1"]
radius = 6.0
height = 24.0
[node name="CucumberProjectile" instance=ExtResource("1_iyfw1")]
_speed = 5.0
_damage = 25
[node name="Sprite" parent="." index="0"]
rotation = -1.5708
texture = SubResource("AtlasTexture_h74iy")
[node name="CollisionShape2D" parent="." index="1"]
shape = SubResource("CapsuleShape2D_iyfw1")

View file

@ -0,0 +1,10 @@
[gd_scene load_steps=2 format=3 uid="uid://b45wmmcie6yeg"]
[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="1_6vktd"]
[node name="RepeaterProjectile" type="Node2D"]
[node name="Pea" parent="." instance=ExtResource("1_6vktd")]
[node name="Pea2" parent="." instance=ExtResource("1_6vktd")]
position = Vector2(-21, 0)