diff --git a/components/Abstracts/EntityBase.tscn b/components/Abstracts/EntityBase.tscn index 385ed50..b97cd58 100644 --- a/components/Abstracts/EntityBase.tscn +++ b/components/Abstracts/EntityBase.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=40 format=3 uid="uid://cvogxi7mktumf"] +[gd_scene load_steps=41 format=3 uid="uid://cvogxi7mktumf"] [ext_resource type="Script" uid="uid://ds3j3f82li68h" path="res://scripts/Statemachine/EntityBase.gd" id="1_mvol6"] [ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="2_7lpu0"] @@ -21,6 +21,8 @@ animations = [{ "speed": 5.0 }] +[sub_resource type="SpriteFrames" id="SpriteFrames_tiuhe"] + [sub_resource type="CircleShape2D" id="CircleShape2D_buhm1"] radius = 40.0 @@ -372,7 +374,7 @@ alpha_curve = SubResource("CurveTexture_vvfxd") [sub_resource type="CircleShape2D" id="CircleShape2D_34h7q"] -[node name="EntityBase" type="CharacterBody2D"] +[node name="HJM" type="CharacterBody2D"] collision_layer = 0 script = ExtResource("1_mvol6") @@ -401,6 +403,11 @@ position = Vector2(0, -50) sprite_frames = SubResource("SpriteFrames_wcqpm") animation = &"idle" +[node name="staticBackground" type="Sprite2D" parent="texture"] + +[node name="staticAnimation" type="AnimatedSprite2D" parent="texture"] +sprite_frames = SubResource("SpriteFrames_tiuhe") + [node name="hurtbox" type="Area2D" parent="texture"] unique_name_in_owner = true @@ -449,8 +456,6 @@ one_shot = true explosiveness = 1.0 process_material = SubResource("ParticleProcessMaterial_f3xas") -[node name="static" type="Sprite2D" parent="texture"] - [node name="statebar" parent="." instance=ExtResource("2_uje1g")] unique_name_in_owner = true position = Vector2(0, -100) diff --git a/components/Bullets/HJMAttack.tscn b/components/Bullets/HJMAttack.tscn new file mode 100644 index 0000000..ec7c653 --- /dev/null +++ b/components/Bullets/HJMAttack.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=4 format=3 uid="uid://dumdbryl6i3ph"] + +[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_i8ntk"] +[ext_resource type="Script" uid="uid://ccmahaw065xaj" path="res://scripts/Contents/Bullets/HJMA.gd" id="2_ml2df"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_i8ntk"] +size = Vector2(200, 200) + +[node name="HJMA" instance=ExtResource("1_i8ntk")] +script = ExtResource("2_ml2df") +damage = 5.0 +lifeTime = 50.0 + +[node name="hitbox" parent="." index="1"] +shape = SubResource("RectangleShape2D_i8ntk") diff --git a/components/Characters/Rooster.tscn b/components/Characters/Rooster.tscn index 7d1a5c7..30ad564 100644 --- a/components/Characters/Rooster.tscn +++ b/components/Characters/Rooster.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=3 uid="uid://bm7ymrri6pykb"] +[gd_scene load_steps=16 format=3 uid="uid://bm7ymrri6pykb"] [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"] [ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"] @@ -9,6 +9,7 @@ [ext_resource type="PackedScene" uid="uid://wl8u5m52708w" path="res://components/Weapons/LGBT.tscn" id="3_joj4g"] [ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"] [ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"] +[ext_resource type="PackedScene" uid="uid://dbxu15g1pd3cx" path="res://components/Weapons/HJM.tscn" id="5_fkh3f"] [ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"] [ext_resource type="AudioStream" uid="uid://4wuuf1osk0yv" path="res://resources/sounds/effect/Low Boing.wav" id="6_m5px1"] [ext_resource type="AudioStream" uid="uid://b10u6iir6uvqn" path="res://resources/sounds/effect/BigLaser.wav" id="8_7dhim"] @@ -52,6 +53,8 @@ debugRebuild = false [node name="LGBT" parent="weaponStore" index="1" instance=ExtResource("3_joj4g")] debugRebuild = false +[node name="HJM" parent="weaponStore" index="2" instance=ExtResource("5_fkh3f")] + [node name="sprint" parent="sounds" index="0"] stream = ExtResource("4_66s6c") diff --git a/components/Summons/HJM.tscn b/components/Summons/HJM.tscn new file mode 100644 index 0000000..72644fa --- /dev/null +++ b/components/Summons/HJM.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=11 format=3 uid="uid://m4y40dm14s2k"] + +[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_06nhw"] +[ext_resource type="Script" uid="uid://bpu0sko7fthdk" path="res://scripts/Contents/Summons/HJM.gd" id="2_7ry3q"] +[ext_resource type="Texture2D" uid="uid://bwnoybp5p3ely" path="res://resources/characters/hjm/1.png" id="2_p863a"] +[ext_resource type="Texture2D" uid="uid://hxj6l6rylwca" path="res://resources/characters/hjm/2.png" id="3_1fxvo"] +[ext_resource type="Texture2D" uid="uid://cmhrdbgs2h38h" path="res://resources/characters/hjm/3.png" id="4_7ry3q"] +[ext_resource type="Texture2D" uid="uid://b5ei8p0juqu7i" path="res://resources/characters/hjm/4.png" id="5_rvrmg"] +[ext_resource type="Texture2D" uid="uid://b43kpwcg47j0d" path="res://resources/characters/hjm/5.png" id="6_xbgpj"] +[ext_resource type="Texture2D" uid="uid://dp8nb7h3af5ku" path="res://resources/characters/hjm/6.png" id="7_qgik4"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_p863a"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_hapby"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_p863a") +}], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_p863a") +}, { +"duration": 1.0, +"texture": ExtResource("3_1fxvo") +}, { +"duration": 1.0, +"texture": ExtResource("4_7ry3q") +}, { +"duration": 1.0, +"texture": ExtResource("5_rvrmg") +}, { +"duration": 1.0, +"texture": ExtResource("6_xbgpj") +}, { +"duration": 1.0, +"texture": ExtResource("7_qgik4") +}], +"loop": true, +"name": &"walk", +"speed": 15.0 +}] + +[node name="HJM" instance=ExtResource("1_06nhw")] +script = ExtResource("2_7ry3q") +attraction = 0.0 +useStatic = true + +[node name="texture" parent="." index="2"] +sprite_frames = SubResource("SpriteFrames_p863a") +animation = &"default" + +[node name="staticAnimation" parent="texture" index="1"] +position = Vector2(0, 13) +scale = Vector2(0.4446156, 0.33835638) +sprite_frames = SubResource("SpriteFrames_hapby") +animation = &"walk" +frame_progress = 0.20121677 + +[node name="hitbox" parent="texture/hurtbox" index="0"] +position = Vector2(-4, 13) + +[node name="normal" type="Node2D" parent="texture/weapons" index="0"] diff --git a/components/Summons/LGBTFlag.tscn b/components/Summons/LGBTFlag.tscn index 8baa8c4..5d6f903 100644 --- a/components/Summons/LGBTFlag.tscn +++ b/components/Summons/LGBTFlag.tscn @@ -27,13 +27,13 @@ attraction = 0.5 [node name="texture" parent="." index="2"] sprite_frames = SubResource("SpriteFrames_r6sud") +[node name="staticBackground" parent="texture" index="0"] +position = Vector2(-0.99999994, 16) +scale = Vector2(0.10957062, 0.11560604) +texture = ExtResource("3_r6sud") + [node name="hitbox" parent="texture/hurtbox" index="0"] position = Vector2(0, 15) shape = SubResource("RectangleShape2D_r6sud") [node name="normal" type="Node2D" parent="texture/weapons" index="0"] - -[node name="static" parent="texture" index="7"] -position = Vector2(0, 15) -scale = Vector2(0.11, 0.11) -texture = ExtResource("3_r6sud") diff --git a/components/Weapons/HJM.tscn b/components/Weapons/HJM.tscn index 6747389..97aadfb 100644 --- a/components/Weapons/HJM.tscn +++ b/components/Weapons/HJM.tscn @@ -1,9 +1,11 @@ -[gd_scene load_steps=3 format=3 uid="uid://dbxu15g1pd3cx"] +[gd_scene load_steps=4 format=3 uid="uid://dbxu15g1pd3cx"] [ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_73eho"] +[ext_resource type="Script" uid="uid://crx7hojhwqlyl" path="res://scripts/Contents/Weapons/HJM.gd" id="2_2in6n"] [ext_resource type="Texture2D" uid="uid://bv7iu8qylxp70" path="res://resources/weapons/hjm.png" id="2_74sfb"] [node name="HJM" instance=ExtResource("1_73eho")] +script = ExtResource("2_2in6n") avatarTexture = ExtResource("2_74sfb") displayName = "耄耋" typeTopic = 2 @@ -16,7 +18,7 @@ storeType = { "time": 0 } descriptionTemplate = "召唤[b]抓狂的哈基米[/b],跟踪敌人,每$time秒造成$atk点伤害。" -debugRebuild = true +cooldown = 1000.0 [node name="avatar" parent="container/info" index="0"] texture = ExtResource("2_74sfb") diff --git a/resources/characters/hjm/1.png b/resources/characters/hjm/1.png new file mode 100644 index 0000000..81e1f2f Binary files /dev/null and b/resources/characters/hjm/1.png differ diff --git a/resources/characters/hjm/1.png.import b/resources/characters/hjm/1.png.import new file mode 100644 index 0000000..209ea81 --- /dev/null +++ b/resources/characters/hjm/1.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bwnoybp5p3ely" +path="res://.godot/imported/1.png-e755886b8e79a23b8758698bebff5442.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/characters/hjm/1.png" +dest_files=["res://.godot/imported/1.png-e755886b8e79a23b8758698bebff5442.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/resources/characters/hjm/2.png b/resources/characters/hjm/2.png new file mode 100644 index 0000000..e74e24c Binary files /dev/null and b/resources/characters/hjm/2.png differ diff --git a/resources/characters/hjm/2.png.import b/resources/characters/hjm/2.png.import new file mode 100644 index 0000000..98d34b8 --- /dev/null +++ b/resources/characters/hjm/2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://hxj6l6rylwca" +path="res://.godot/imported/2.png-29e2783b78c5c349c811d06b1b822a58.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/characters/hjm/2.png" +dest_files=["res://.godot/imported/2.png-29e2783b78c5c349c811d06b1b822a58.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/resources/characters/hjm/3.png b/resources/characters/hjm/3.png new file mode 100644 index 0000000..c5ea10e Binary files /dev/null and b/resources/characters/hjm/3.png differ diff --git a/resources/characters/hjm/3.png.import b/resources/characters/hjm/3.png.import new file mode 100644 index 0000000..075cfbd --- /dev/null +++ b/resources/characters/hjm/3.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cmhrdbgs2h38h" +path="res://.godot/imported/3.png-69fb44e62733628abf10a50590bb14a7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/characters/hjm/3.png" +dest_files=["res://.godot/imported/3.png-69fb44e62733628abf10a50590bb14a7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/resources/characters/hjm/4.png b/resources/characters/hjm/4.png new file mode 100644 index 0000000..e093b48 Binary files /dev/null and b/resources/characters/hjm/4.png differ diff --git a/resources/characters/hjm/4.png.import b/resources/characters/hjm/4.png.import new file mode 100644 index 0000000..9e67afd --- /dev/null +++ b/resources/characters/hjm/4.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5ei8p0juqu7i" +path="res://.godot/imported/4.png-55b56b22b3c972b7a3da6ddfbc1b018c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/characters/hjm/4.png" +dest_files=["res://.godot/imported/4.png-55b56b22b3c972b7a3da6ddfbc1b018c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/resources/characters/hjm/5.png b/resources/characters/hjm/5.png new file mode 100644 index 0000000..6c03708 Binary files /dev/null and b/resources/characters/hjm/5.png differ diff --git a/resources/characters/hjm/5.png.import b/resources/characters/hjm/5.png.import new file mode 100644 index 0000000..9eb3ade --- /dev/null +++ b/resources/characters/hjm/5.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b43kpwcg47j0d" +path="res://.godot/imported/5.png-55c542ad2de2e21b87f3aec9bcfaeddf.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/characters/hjm/5.png" +dest_files=["res://.godot/imported/5.png-55c542ad2de2e21b87f3aec9bcfaeddf.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/resources/characters/hjm/6.png b/resources/characters/hjm/6.png new file mode 100644 index 0000000..947b222 Binary files /dev/null and b/resources/characters/hjm/6.png differ diff --git a/resources/characters/hjm/6.png.import b/resources/characters/hjm/6.png.import new file mode 100644 index 0000000..e81748b --- /dev/null +++ b/resources/characters/hjm/6.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dp8nb7h3af5ku" +path="res://.godot/imported/6.png-4b59d61c31a0da10c4cd8f38dd7a20e7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/characters/hjm/6.png" +dest_files=["res://.godot/imported/6.png-4b59d61c31a0da10c4cd8f38dd7a20e7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/scripts/Contents/AIPresets/Bullet.gd b/scripts/Contents/AIPresets/Bullet.gd index 137a961..3bac5a6 100644 --- a/scripts/Contents/AIPresets/Bullet.gd +++ b/scripts/Contents/AIPresets/Bullet.gd @@ -1,6 +1,9 @@ class_name PresetBulletAI -static func lockLauncher(bullet: BulletBase, launcher: EntityBase, onTexture: bool = false): +static func lockLauncher(bullet: BulletBase, launcher: EntityBase, onTexture: bool = false, useSummoned: bool = false): + if useSummoned: + if is_instance_valid(bullet.launcherSummoned): + launcher = bullet.launcherSummoned bullet.position = launcher.texture.global_position if onTexture else launcher.position static func forward(bullet: BulletBase, rotation: float): bullet.forward(Vector2.from_angle(rotation)) diff --git a/scripts/Contents/Bullets/HJMA.gd b/scripts/Contents/Bullets/HJMA.gd new file mode 100644 index 0000000..42e3c90 --- /dev/null +++ b/scripts/Contents/Bullets/HJMA.gd @@ -0,0 +1,4 @@ +extends BulletBase + +func ai(): + PresetBulletAI.lockLauncher(self, launcher, true, true) diff --git a/scripts/Contents/Bullets/HJMA.gd.uid b/scripts/Contents/Bullets/HJMA.gd.uid new file mode 100644 index 0000000..20fa33e --- /dev/null +++ b/scripts/Contents/Bullets/HJMA.gd.uid @@ -0,0 +1 @@ +uid://ccmahaw065xaj diff --git a/scripts/Contents/Summons/HJM.gd b/scripts/Contents/Summons/HJM.gd new file mode 100644 index 0000000..a59214c --- /dev/null +++ b/scripts/Contents/Summons/HJM.gd @@ -0,0 +1,26 @@ +extends SummonBase + +var attackTime: float = 0 +var tracer: EntityBase = null + +func register(): + fields[FieldStore.Entity.MAX_HEALTH] = 75 + fields[FieldStore.Entity.MOVEMENT_SPEED] = 2 + await TickTool.frame() + attackCooldownMap[0] = attackTime +func spawn(): + texture.play("walk") +func ai(): + tryAttack(0) + if is_instance_valid(tracer): + PresetEntityAI.follow(self, tracer, 50) + else: + tracer = EntityTool.findClosetEntity(position, get_tree(), !isPlayer(), isPlayer()) +func attack(type): + if type == 0: + BulletBase.generate( + ComponentManager.getBullet("HJMAttack"), + self, + findWeaponAnchor("normal"), + 0 + ) diff --git a/scripts/Contents/Summons/HJM.gd.uid b/scripts/Contents/Summons/HJM.gd.uid new file mode 100644 index 0000000..3374162 --- /dev/null +++ b/scripts/Contents/Summons/HJM.gd.uid @@ -0,0 +1 @@ +uid://bpu0sko7fthdk diff --git a/scripts/Contents/Summons/LGBTFlag.gd b/scripts/Contents/Summons/LGBTFlag.gd index 621d46e..d962f9c 100644 --- a/scripts/Contents/Summons/LGBTFlag.gd +++ b/scripts/Contents/Summons/LGBTFlag.gd @@ -1,13 +1,12 @@ extends SummonBase -var atk: float = 0 var maxTraceTime: float = 0 var tracePower: float = 0 var count: int = 0 var angle: float = 0 func register(): - fields[FieldStore.Entity.MAX_HEALTH] = 150 + fields[FieldStore.Entity.MAX_HEALTH] = 50 attackCooldownMap[0] = 1000 func ai(): tryAttack(0) diff --git a/scripts/Contents/Weapons/HJM.gd b/scripts/Contents/Weapons/HJM.gd index e384fc3..093ed4f 100644 --- a/scripts/Contents/Weapons/HJM.gd +++ b/scripts/Contents/Weapons/HJM.gd @@ -4,3 +4,9 @@ extends Weapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["time"] /= 1 + 0.05 * to * soulLevel origin["atk"] *= 2 * to * soulLevel + return origin +func attack(entity: EntityBase): + var summon = entity.summon(ComponentManager.getSummon("HJM"), true, false) + summon.atk = readStore("atk") + summon.attackTime = readStore("time") * 1000 + return true diff --git a/scripts/Contents/Weapons/LGBTWeapon.gd b/scripts/Contents/Weapons/LGBTWeapon.gd index 0ace138..33a7c9c 100644 --- a/scripts/Contents/Weapons/LGBTWeapon.gd +++ b/scripts/Contents/Weapons/LGBTWeapon.gd @@ -10,7 +10,7 @@ func update(to: int, origin: Dictionary, _entity: EntityBase): origin["trace"] += 0.05 * to * soulLevel return origin func attack(entity: EntityBase): - var summon = entity.summon(ComponentManager.getSummon("LGBTFlag"), true) + var summon = entity.summon(ComponentManager.getSummon("LGBTFlag"), true, false) summon.atk = readStore("atk") summon.maxTraceTime = readStore("trace") * 1000 summon.tracePower = readStore("power") diff --git a/scripts/Statemachine/BulletBase.gd b/scripts/Statemachine/BulletBase.gd index 4f99ddc..829c69c 100644 --- a/scripts/Statemachine/BulletBase.gd +++ b/scripts/Statemachine/BulletBase.gd @@ -23,6 +23,7 @@ class_name BulletBase @onready var texture: AnimatedSprite2D = $"%texture" var launcher: EntityBase = null +var launcherSummoned: EntityBase = null var spawnInWhen: float = 0 var spawnInWhere: Vector2 = Vector2.ZERO var destroying: bool = false @@ -32,6 +33,9 @@ var initialSpeed: float = 0 func _ready(): initialSpeed = speed + if launcher.isSummon(): + launcherSummoned = launcher + launcher = launcher.myMaster register() area_entered.connect(hit) spawnInWhen = WorldManager.getTime() diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index f148c98..a04ba0a 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -76,6 +76,7 @@ var inventoryMax = { @export var appleCount: Vector2i = Vector2(0, 2) # 死亡后掉落的苹果数量 @export var level: int = 1 @export var currentInvinsible: bool = false +@export var useStatic: bool = false @onready var animatree: AnimationTree = $"%animatree" @onready var texture: AnimatedSprite2D = $"%texture" @@ -104,6 +105,8 @@ var currentStage: int = 0 var spawnTime: float = 0 func _ready(): + if useStatic: + texture = texture.get_node("staticAnimation") spawnTime = WorldManager.getTime() register() var selfStatebar: EntityStateBar = $"%statebar" diff --git a/scripts/Statemachine/SummonBase.gd b/scripts/Statemachine/SummonBase.gd index f87fd15..5d4a7f3 100644 --- a/scripts/Statemachine/SummonBase.gd +++ b/scripts/Statemachine/SummonBase.gd @@ -3,6 +3,7 @@ class_name SummonBase @export var attraction: float = 0.0 +var atk: float = 0 var myMaster: EntityBase = null func _ready():