mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
feat(召唤物): 添加哈基米召唤物及相关功能
添加新的哈基米(HJM)召唤物,包括动画资源、攻击逻辑和武器配置。主要变更: - 新增HJM召唤物脚本和场景,包含6帧动画 - 添加HJM专属子弹类型HJMAttack - 修改SummonBase基类添加atk属性 - 调整武器系统支持召唤物攻击 - 优化子弹系统支持召唤者追踪 - 降低LGBT旗帜召唤物的生命值
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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"]
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
@@ -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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
@@ -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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
@@ -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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
@@ -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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
@@ -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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
@@ -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
|
||||
@@ -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))
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
extends BulletBase
|
||||
|
||||
func ai():
|
||||
PresetBulletAI.lockLauncher(self, launcher, true, true)
|
||||
@@ -0,0 +1 @@
|
||||
uid://ccmahaw065xaj
|
||||
@@ -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
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
uid://bpu0sko7fthdk
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -3,6 +3,7 @@ class_name SummonBase
|
||||
|
||||
@export var attraction: float = 0.0
|
||||
|
||||
var atk: float = 0
|
||||
var myMaster: EntityBase = null
|
||||
|
||||
func _ready():
|
||||
|
||||
Reference in New Issue
Block a user