diff --git a/components/Bullets/BearSprint.tscn b/components/Bullets/BearSprint.tscn index 0323025..1789b22 100644 --- a/components/Bullets/BearSprint.tscn +++ b/components/Bullets/BearSprint.tscn @@ -1,14 +1,15 @@ -[gd_scene load_steps=4 format=3 uid="uid://dse2033lnmr7h"] +[gd_scene format=3 uid="uid://dse2033lnmr7h"] [ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_qcnih"] -[ext_resource type="Script" path="res://scripts/Contents/Bullets/ChickSprint.gd" id="2_87hcl"] +[ext_resource type="Script" uid="uid://c2cw6tei72cv7" path="res://scripts/Contents/Bullets/ChickSprint.gd" id="2_87hcl"] [sub_resource type="CircleShape2D" id="CircleShape2D_rirs4"] radius = 63.1269 -[node name="BearSprint" instance=ExtResource("1_qcnih")] +[node name="BearSprint" unique_id=1809692167 instance=ExtResource("1_qcnih")] script = ExtResource("2_87hcl") displayName = "猛冲" +motionType = 4 -[node name="hitbox" parent="." index="1"] +[node name="hitbox" parent="." index="1" unique_id=175349408] shape = SubResource("CircleShape2D_rirs4") diff --git a/components/Bullets/Bengbeng.tscn b/components/Bullets/Bengbeng.tscn index afae6f2..685e669 100644 --- a/components/Bullets/Bengbeng.tscn +++ b/components/Bullets/Bengbeng.tscn @@ -6,13 +6,13 @@ [ext_resource type="Shader" uid="uid://dfd73rom161o4" path="res://shaders/FilledRing.gdshader" id="5_txsro"] [ext_resource type="Script" uid="uid://cgb01lelfg73p" path="res://scripts/Statemachine/ShaderStage.gd" id="6_6g0ep"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_1mqkh"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_of0mu"] shader = ExtResource("5_txsro") shader_parameter/inner = 1.0 shader_parameter/outer = 1.0 shader_parameter/alpha = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_5xjim"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_txsro"] shader = ExtResource("5_txsro") shader_parameter/inner = 0.98 shader_parameter/outer = 1.0 @@ -84,17 +84,18 @@ script = ExtResource("2_165xl") displayName = "蹦蹦炸弹" speed = 4.0 baseDamage = 30.0 +motionType = 3 lifeTime = 10000.0 autoLoopAnimation = true [node name="warnbg" type="Node2D" parent="." index="0" unique_id=122409585] -material = SubResource("ShaderMaterial_1mqkh") +material = SubResource("ShaderMaterial_of0mu") script = ExtResource("6_6g0ep") size = Vector2(250, 125) color = Color(0, 0, 0, 0.2) [node name="warn" type="Node2D" parent="." index="1" unique_id=804964529] -material = SubResource("ShaderMaterial_5xjim") +material = SubResource("ShaderMaterial_txsro") script = ExtResource("6_6g0ep") size = Vector2(250, 125) color = Color(1, 0, 0, 1) diff --git a/components/Bullets/BigLaser.tscn b/components/Bullets/BigLaser.tscn index aa115b1..764eb95 100644 --- a/components/Bullets/BigLaser.tscn +++ b/components/Bullets/BigLaser.tscn @@ -150,6 +150,7 @@ _data = { [node name="BigLaser" unique_id=1993936080 instance=ExtResource("1_ukbip")] displayName = "湮灭射线" +motionType = 2 knockback = 10.0 recoil = 4.0 diff --git a/components/Bullets/BlockWall.tscn b/components/Bullets/BlockWall.tscn index 006087b..1ee8160 100644 --- a/components/Bullets/BlockWall.tscn +++ b/components/Bullets/BlockWall.tscn @@ -140,6 +140,7 @@ size = Vector2(734, 56) script = ExtResource("2_3x2nv") speed = -10.0 baseDamage = 0.0 +motionType = 3 penerate = 1.0 lifeTime = 1000.0 autoSpawnAnimation = true diff --git a/components/Bullets/Cement.tscn b/components/Bullets/Cement.tscn index 1231ad0..8b4fe65 100644 --- a/components/Bullets/Cement.tscn +++ b/components/Bullets/Cement.tscn @@ -105,6 +105,7 @@ radius = 76.105194 [node name="Cement" unique_id=5571707 instance=ExtResource("1_aqfa8")] script = ExtResource("2_4j0u0") baseDamage = 0.0 +motionType = 3 penerate = 1.0 autoSpawnAnimation = true freeAfterSpawn = true diff --git a/components/Bullets/ChickLaser.tscn b/components/Bullets/ChickLaser.tscn index 7fa0f2d..91dbfbe 100644 --- a/components/Bullets/ChickLaser.tscn +++ b/components/Bullets/ChickLaser.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=3 uid="uid://bvri0nv1jrigf"] +[gd_scene format=3 uid="uid://bvri0nv1jrigf"] [ext_resource type="PackedScene" uid="uid://8gjjfju6p3fh" path="res://components/Bullets/LaserSummoner.tscn" id="1_eb54j"] [ext_resource type="Script" uid="uid://nygobyigq5sp" path="res://scripts/Contents/Bullets/ChickLaser.gd" id="2_7g0f0"] @@ -204,13 +204,13 @@ _data = { radius = 20.0 height = 500.0 -[node name="ChickLaser" instance=ExtResource("1_eb54j")] +[node name="ChickLaser" unique_id=1419234842 instance=ExtResource("1_eb54j")] script = ExtResource("2_7g0f0") displayName = "冷冻激光" -penerate = 1.0 +motionType = 2 metadata/_edit_vertical_guides_ = [688.0, 189.0] -[node name="rect" parent="texture" index="0"] +[node name="rect" parent="texture" parent_id_path=PackedInt32Array(162977358) index="0"] material = SubResource("ShaderMaterial_x6ivr") offset_left = 188.0 offset_right = 238.0 @@ -228,15 +228,13 @@ position = Vector2(25, -13.9999) scale = Vector2(0.525, 0.525) color = Color(0, 0.701961, 1, 1) -[node name="animator" parent="texture" index="1"] -libraries = { -&"": SubResource("AnimationLibrary_7qqtc") -} +[node name="animator" parent="texture" parent_id_path=PackedInt32Array(162977358) index="1" unique_id=1114087117] +libraries/ = SubResource("AnimationLibrary_7qqtc") -[node name="circle" parent="texture" index="2"] +[node name="circle" parent="texture" parent_id_path=PackedInt32Array(162977358) index="2"] texture = ExtResource("4_cws6l") -[node name="hitbox" parent="." index="1"] +[node name="hitbox" parent="." index="1" unique_id=175349408] visible = true position = Vector2(438, 0) shape = SubResource("CapsuleShape2D_sg52j") diff --git a/components/Bullets/ChickSprint.tscn b/components/Bullets/ChickSprint.tscn index 3cddab9..9c3446d 100644 --- a/components/Bullets/ChickSprint.tscn +++ b/components/Bullets/ChickSprint.tscn @@ -1,14 +1,15 @@ -[gd_scene load_steps=4 format=3 uid="uid://dpww053pxchsb"] +[gd_scene format=3 uid="uid://dpww053pxchsb"] [ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_hvhrf"] -[ext_resource type="Script" path="res://scripts/Contents/Bullets/ChickSprint.gd" id="2_fecvj"] +[ext_resource type="Script" uid="uid://c2cw6tei72cv7" path="res://scripts/Contents/Bullets/ChickSprint.gd" id="2_fecvj"] [sub_resource type="CircleShape2D" id="CircleShape2D_rirs4"] radius = 63.1269 -[node name="ChickSprint" instance=ExtResource("1_hvhrf")] +[node name="ChickSprint" unique_id=1294951436 instance=ExtResource("1_hvhrf")] script = ExtResource("2_fecvj") displayName = "猛冲" +motionType = 4 -[node name="hitbox" parent="." index="1"] +[node name="hitbox" parent="." index="1" unique_id=175349408] shape = SubResource("CircleShape2D_rirs4") diff --git a/components/Bullets/FireScan.tscn b/components/Bullets/FireScan.tscn index 64dc266..3d7a7cb 100644 --- a/components/Bullets/FireScan.tscn +++ b/components/Bullets/FireScan.tscn @@ -1,8 +1,34 @@ -[gd_scene load_steps=7 format=3 uid="uid://db2cbgyyjpydp"] +[gd_scene format=3 uid="uid://db2cbgyyjpydp"] [ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_cqre5"] [ext_resource type="PackedScene" uid="uid://dny25qkcvtaa2" path="res://components/Effects/FirePot.tscn" id="3_ybjor"] +[sub_resource type="Animation" id="Animation_ikuic"] +length = 0.001 +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("%hitbox:position:x") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0) +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("%texture/..:damage") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [10.0] +} + [sub_resource type="Animation" id="Animation_ybjor"] resource_name = "spawn" step = 0.05 @@ -44,32 +70,6 @@ tracks/2/keys = { "values": [15.0, 0.0] } -[sub_resource type="Animation" id="Animation_ikuic"] -length = 0.001 -tracks/0/type = "bezier" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("%hitbox:position:x") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"handle_modes": PackedInt32Array(0), -"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), -"times": PackedFloat32Array(0) -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("%texture/..:damage") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [10.0] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_ikuic"] _data = { &"RESET": SubResource("Animation_ikuic"), @@ -79,19 +79,18 @@ _data = { [sub_resource type="RectangleShape2D" id="RectangleShape2D_4qcsn"] size = Vector2(10, 100) -[node name="FireScan" instance=ExtResource("1_cqre5")] +[node name="FireScan" unique_id=1266932369 instance=ExtResource("1_cqre5")] displayName = "雪葬" +motionType = 2 penerate = 1.0 autoSpawnAnimation = true freeAfterSpawn = true metadata/_edit_vertical_guides_ = [488.0] -[node name="animator" parent="texture" index="0"] -libraries = { -&"": SubResource("AnimationLibrary_ikuic") -} +[node name="animator" parent="texture" parent_id_path=PackedInt32Array(162977358) index="0" unique_id=1114087117] +libraries/ = SubResource("AnimationLibrary_ikuic") -[node name="hitbox" parent="." index="1"] +[node name="hitbox" parent="." index="1" unique_id=175349408] shape = SubResource("RectangleShape2D_4qcsn") -[node name="firePot" parent="." index="2" instance=ExtResource("3_ybjor")] +[node name="firePot" parent="." index="2" unique_id=897032100 instance=ExtResource("3_ybjor")] diff --git a/scripts/Contents/Bullets/Parrier.gd b/scripts/Contents/Bullets/Parrier.gd index da17866..b625a3a 100644 --- a/scripts/Contents/Bullets/Parrier.gd +++ b/scripts/Contents/Bullets/Parrier.gd @@ -57,6 +57,9 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞 elif bullet.motionType == BulletBase.MotionType.SPRINT: bullet.tryDestroy() bullet.launcher.velocity *= -0.1 + elif bullet.motionType == BulletBase.MotionType.BREATH: + bullet.hitbox.disable = true + bullet.launcher.impluse(Vector2.from_angle(bullet.rotation) * -500) elif bullet.motionType == BulletBase.MotionType.SUMMON || bullet.motionType == BulletBase.MotionType.MAGIC: launcher.storeEnergy(sqrt(bullet.baseDamage)) var cycler = launcher.getOrCreateCycleTimer("parry", 2000, 100) diff --git a/scripts/Statemachine/BulletBase.gd b/scripts/Statemachine/BulletBase.gd index 9fb7d32..12a2e56 100644 --- a/scripts/Statemachine/BulletBase.gd +++ b/scripts/Statemachine/BulletBase.gd @@ -7,6 +7,7 @@ enum MotionType { MAGIC, # 魔法 SUMMON, # 召唤 SPRINT, # 冲撞 + BREATH, # 吐息 } @export var displayName: String = "未知子弹"