diff --git a/components/Bullets/Diamond2.tscn b/components/Bullets/Diamond2.tscn index f63bcfa..6fcc409 100644 --- a/components/Bullets/Diamond2.tscn +++ b/components/Bullets/Diamond2.tscn @@ -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") diff --git a/components/Weapons/BlueCrystal.tscn b/components/Weapons/BlueCrystal.tscn index 22aad19..4ba43fe 100644 --- a/components/Weapons/BlueCrystal.tscn +++ b/components/Weapons/BlueCrystal.tscn @@ -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]" diff --git a/scripts/Contents/Bullets/Diamond2.gd b/scripts/Contents/Bullets/Diamond2.gd index 0957f76..423ae1b 100644 --- a/scripts/Contents/Bullets/Diamond2.gd +++ b/scripts/Contents/Bullets/Diamond2.gd @@ -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) diff --git a/scripts/Contents/Weapons/BlueCrystal.gd b/scripts/Contents/Weapons/BlueCrystal.gd index 6dc6a96..540d822 100644 --- a/scripts/Contents/Weapons/BlueCrystal.gd +++ b/scripts/Contents/Weapons/BlueCrystal.gd @@ -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))):