mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
fix(Bullets/Diamond2): 修复钻石子弹动画和碰撞问题
调整钻石子弹的静态精灵位置和缩放,添加碰撞形状 修复当父节点无效时动画停止逻辑 ``` ```msg feat(Weapons/BlueCrystal): 调整蓝水晶武器属性 增加子弹环绕数量计算公式 降低基础攻击力并增加冷却时间 更新描述文本移除逃逸时间说明
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://chqclu0q4ew46"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://chqclu0q4ew46"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_slk7q"]
|
||||
[ext_resource type="Script" uid="uid://c1ywds8xwerm3" path="res://scripts/Contents/Bullets/Diamond2.gd" id="2_i4qda"]
|
||||
@@ -46,24 +46,27 @@ _data = {
|
||||
&"spawn": SubResource("Animation_pkqnc")
|
||||
}
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_cusqp"]
|
||||
radius = 6.0827627
|
||||
|
||||
[node name="Diamond2" instance=ExtResource("1_slk7q")]
|
||||
script = ExtResource("2_i4qda")
|
||||
displayName = "钻石"
|
||||
lifeTime = 5000.0
|
||||
autoLoopAnimation = true
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
scale = Vector2(0.6, 0.6)
|
||||
|
||||
[node name="animator" parent="texture" index="0"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_v5jve")
|
||||
}
|
||||
|
||||
[node name="static" type="Sprite2D" parent="texture" index="1"]
|
||||
position = Vector2(70, 0)
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(25, 0)
|
||||
rotation = 1.5707964
|
||||
scale = Vector2(0.7, 0.7)
|
||||
texture = ExtResource("3_pkqnc")
|
||||
|
||||
[node name="hitbox" parent="." index="1"]
|
||||
position = Vector2(43, 0)
|
||||
position = Vector2(25, 0)
|
||||
shape = SubResource("CircleShape2D_cusqp")
|
||||
|
||||
@@ -10,7 +10,7 @@ avatarTexture = ExtResource("2_4qqa7")
|
||||
displayName = "蓝水晶簇"
|
||||
quality = 2
|
||||
store = {
|
||||
"atk": 5,
|
||||
"atk": 3,
|
||||
"count": 2.0
|
||||
}
|
||||
storeType = {
|
||||
@@ -19,7 +19,7 @@ storeType = {
|
||||
"distance": 0
|
||||
}
|
||||
descriptionTemplate = "发射[b]蓝水晶[/b],可无限追踪,命中造成$atk点伤害,飞行过程中有$count颗[b]钻石[/b]环绕。"
|
||||
cooldown = 175.0
|
||||
cooldown = 200.0
|
||||
|
||||
[node name="avatar" parent="container/info" index="0"]
|
||||
modulate = Color(0.828, 1.53, 1.549, 1)
|
||||
@@ -36,4 +36,4 @@ displayName = "蓝水晶簇"
|
||||
quality = 2
|
||||
|
||||
[node name="description" parent="container" index="2"]
|
||||
text = "[center]发射[b]蓝水晶[/b],可无限追踪,命中造成[color=cyan]5[/color]点伤害,飞行过程中有[color=cyan]2[/color]颗[b]钻石[/b]环绕,在运动$distance秒后逃逸。[/center]"
|
||||
text = "[center]发射[b]蓝水晶[/b],可无限追踪,命中造成[color=cyan]5[/color]点伤害,飞行过程中有[color=cyan]2[/color]颗[b]钻石[/b]环绕。[/center]"
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
extends BulletBase
|
||||
class_name Diamond2Bullet
|
||||
|
||||
@onready var staticSprite: Sprite2D = $%static
|
||||
|
||||
func ai():
|
||||
if is_instance_valid(parent):
|
||||
position = parent.position
|
||||
else:
|
||||
if animator.is_playing():
|
||||
animator.stop(true)
|
||||
PresetBulletAI.forward(self, staticSprite.global_rotation)
|
||||
|
||||
@@ -3,7 +3,7 @@ extends Weapon
|
||||
|
||||
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||
origin["atk"] += 1 * to * soulLevel
|
||||
origin["count"] = 1 * soulLevel
|
||||
origin["count"] = 1 + 1 * soulLevel
|
||||
return origin
|
||||
func attack(entity: EntityBase):
|
||||
for i in BulletBase.generate(ComponentManager.getBullet("BlueCrystal"), entity, entity.findWeaponAnchor("normal"), deg_to_rad(randf_range(0, 360))):
|
||||
|
||||
Reference in New Issue
Block a user