diff --git a/components/Abstracts/WeaponCardBase.tscn b/components/Abstracts/WeaponCardBase.tscn index a510b8d..c0d5f51 100644 --- a/components/Abstracts/WeaponCardBase.tscn +++ b/components/Abstracts/WeaponCardBase.tscn @@ -33,6 +33,7 @@ metadata/_edit_lock_ = true unique_name_in_owner = true [node name="attack" type="AudioStreamPlayer2D" parent="sounds"] +process_mode = 3 [node name="container" type="VBoxContainer" parent="."] layout_mode = 2 diff --git a/components/Debug/FeedHasField.tscn b/components/Debug/FeedHasField.tscn index 1ecd059..0f407ef 100644 --- a/components/Debug/FeedHasField.tscn +++ b/components/Debug/FeedHasField.tscn @@ -5,5 +5,6 @@ [node name="FeedHasField" type="HBoxContainer"] theme_override_constants/separation = 0 script = ExtResource("1_7leag") -targetFields = Array[int]([16]) +targetFields = Array[int]([24]) composeMode = 1 +clickToRefresh = true diff --git a/components/Debug/FeedIsTypeTopic.tscn b/components/Debug/FeedIsTypeTopic.tscn index 2be2795..f5da115 100644 --- a/components/Debug/FeedIsTypeTopic.tscn +++ b/components/Debug/FeedIsTypeTopic.tscn @@ -5,4 +5,5 @@ [node name="Debug" type="HBoxContainer"] theme_override_constants/separation = 0 script = ExtResource("1_2hikw") -targetTopics = Array[int]([6]) +targetTopics = Array[int]([2]) +clickToRefresh = true diff --git a/components/Feeds/Taco.tscn b/components/Feeds/Taco.tscn index bc962dc..07fb842 100644 --- a/components/Feeds/Taco.tscn +++ b/components/Feeds/Taco.tscn @@ -6,10 +6,10 @@ [node name="Taco" instance=ExtResource("1_iixnt")] avatarTexture = ExtResource("2_eed3c") displayName = "塔克" -quality = 2 +quality = 3 topic = 2 -fields = Array[int]([13, 3]) -fieldValues = Array[float]([0.18, 0.02]) +fields = Array[int]([13, 3, 24]) +fieldValues = Array[float]([0.18, 0.02, 0.01]) costs = Array[int]([1]) costCounts = Array[int]([400]) @@ -18,5 +18,5 @@ texture = ExtResource("2_eed3c") [node name="name" parent="container/info" index="1"] displayName = "塔克" -quality = 4 +quality = 2 topic = 2 diff --git a/components/Scenes/UI.tscn b/components/Scenes/UI.tscn index b66216e..79f3c68 100644 --- a/components/Scenes/UI.tscn +++ b/components/Scenes/UI.tscn @@ -156,6 +156,11 @@ unique_name_in_owner = true layout_mode = 2 type = 2 +[node name="beachball" parent="root/items/items" instance=ExtResource("3_o2oi4")] +unique_name_in_owner = true +layout_mode = 2 +type = 3 + [node name="energy" type="PanelContainer" parent="root"] z_index = 1 z_as_relative = false diff --git a/components/UI/WeaponName.tscn b/components/UI/WeaponName.tscn index c78c744..23d3931 100644 --- a/components/UI/WeaponName.tscn +++ b/components/UI/WeaponName.tscn @@ -3,11 +3,10 @@ [ext_resource type="Theme" uid="uid://bje5cd08dyok7" path="res://themes/bigTextAndBold.tres" id="2_y8dft"] [ext_resource type="Script" path="res://scripts/Statemachine/WeaponName.gd" id="3_g750e"] -[sub_resource type="LabelSettings" id="LabelSettings_r88ap"] +[sub_resource type="LabelSettings" id="LabelSettings_k3i20"] font_size = 12 -font_color = Color(1, 0.442751, 0, 1) -[sub_resource type="LabelSettings" id="LabelSettings_wsanh"] +[sub_resource type="LabelSettings" id="LabelSettings_07pas"] font_size = 12 [node name="WeaponName" type="HBoxContainer"] @@ -15,7 +14,6 @@ offset_right = 205.0 offset_bottom = 25.0 alignment = 1 script = ExtResource("3_g750e") -quality = 4 qualityColorMap = { 0: Color(0.5, 0.5, 0.5, 1), 1: Color(1, 1, 1, 1), @@ -26,7 +24,8 @@ qualityColorMap = { typeTopicColorMap = { 0: Color(1, 1, 1, 1), 1: Color(1, 0, 0, 1), -2: Color(0, 1, 1, 1) +2: Color(0, 1, 1, 1), +3: Color(0.851563, 0, 1, 1) } metadata/_edit_horizontal_guides_ = [25.0] @@ -34,8 +33,8 @@ metadata/_edit_horizontal_guides_ = [25.0] unique_name_in_owner = true layout_mode = 2 size_flags_vertical = 0 -text = "[传说]" -label_settings = SubResource("LabelSettings_r88ap") +text = "[普通]" +label_settings = SubResource("LabelSettings_k3i20") [node name="label" type="RichTextLabel" parent="."] unique_name_in_owner = true @@ -51,4 +50,4 @@ unique_name_in_owner = true layout_mode = 2 size_flags_vertical = 8 text = "[冲击]" -label_settings = SubResource("LabelSettings_wsanh") +label_settings = SubResource("LabelSettings_07pas") diff --git a/components/Weapons/LGBT.tscn b/components/Weapons/LGBT.tscn index 921dcc1..06fd7d5 100644 --- a/components/Weapons/LGBT.tscn +++ b/components/Weapons/LGBT.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://wl8u5m52708w"] +[gd_scene load_steps=5 format=3 uid="uid://wl8u5m52708w"] [ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_jwtmd"] [ext_resource type="Script" path="res://scripts/Contents/Weapons/LGBTWeapon.gd" id="2_0tyah"] [ext_resource type="Texture2D" uid="uid://cwfyi61xkt4bt" path="res://resources/weapons/lgbt.jpeg" id="2_ou6jo"] +[ext_resource type="AudioStream" uid="uid://bgo8p1l77xrbe" path="res://resources/sounds/effect/Magic Spell.wav" id="4_c5xse"] [node name="LGBT" instance=ExtResource("1_jwtmd")] offset_bottom = 346.0 @@ -25,17 +26,22 @@ needEnergy = 50.0 cooldown = 500.0 [node name="attack" parent="sounds" index="0"] -process_mode = 3 +stream = ExtResource("4_c5xse") [node name="avatar" parent="container/info" index="0"] texture = ExtResource("2_ou6jo") [node name="energy" parent="container/info/energyInfo" index="1"] -text = "25.0" +text = "50.0" [node name="name" parent="container/info" index="2"] displayName = "彩虹旗" quality = 4 +typeTopicNameMap = { +0: "冲击", +1: "能量", +2: "熔融" +} [node name="description" parent="container" index="2"] size_flags_vertical = 3 diff --git a/resources/items/apple.svg b/resources/items/apple.svg index 67975b0..b477d11 100644 --- a/resources/items/apple.svg +++ b/resources/items/apple.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/resources/items/baseball.svg b/resources/items/baseball.svg index 1b5231f..02bf4bf 100644 --- a/resources/items/baseball.svg +++ b/resources/items/baseball.svg @@ -1,35 +1 @@ - - - - Slice 1 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/resources/items/basketball.svg b/resources/items/basketball.svg index 0126643..9ec32e9 100644 --- a/resources/items/basketball.svg +++ b/resources/items/basketball.svg @@ -1,18 +1 @@ - - - - Slice 1 - Created with Sketch. - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/resources/items/beachball.svg b/resources/items/beachball.svg new file mode 100644 index 0000000..70edba1 --- /dev/null +++ b/resources/items/beachball.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/items/beachball.svg.import b/resources/items/beachball.svg.import new file mode 100644 index 0000000..f23370e --- /dev/null +++ b/resources/items/beachball.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dw0g7cb4skd5s" +path="res://.godot/imported/beachball.svg-44c9c9a724c60757f2d6e61f16abf098.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/items/beachball.svg" +dest_files=["res://.godot/imported/beachball.svg-44c9c9a724c60757f2d6e61f16abf098.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/resources/items/energy.svg b/resources/items/energy.svg index f9f3c3d..f4a0574 100644 --- a/resources/items/energy.svg +++ b/resources/items/energy.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index 9109eba..6662a9f 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -50,11 +50,13 @@ var inventory = { ItemStore.ItemType.BASEBALL: 500, ItemStore.ItemType.BASKETBALL: 500, ItemStore.ItemType.APPLE: 5, + ItemStore.ItemType.BEACHBALL: 0, } var inventoryMax = { ItemStore.ItemType.BASEBALL: INF, # 无限 ItemStore.ItemType.BASKETBALL: INF, ItemStore.ItemType.APPLE: 5, + ItemStore.ItemType.BEACHBALL: INF, } @export var defaultCooldownUnit: float = 100 @@ -237,6 +239,7 @@ func tryDie(by: BulletBase): ) or isBoss: for i in randi_range(appleCount.x, appleCount.y): ItemDropped.generate(ItemStore.ItemType.APPLE, 1, position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset)) + ItemDropped.generate(ItemStore.ItemType.BEACHBALL, fields[FieldStore.Entity.MAX_HEALTH], position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset)) EffectController.create(preload("res://components/Effects/DeadBlood.tscn"), texture.global_position).shot() await die() if isPlayer() and UIState.player == self: diff --git a/scripts/Statemachine/UIState.gd b/scripts/Statemachine/UIState.gd index 42220a1..ede3cfa 100644 --- a/scripts/Statemachine/UIState.gd +++ b/scripts/Statemachine/UIState.gd @@ -1,9 +1,6 @@ extends CanvasLayer class_name UIState -@onready var baseball = $"%baseball" -@onready var basketball = $"%basketball" -@onready var apple = $"%apple" @onready var items = $"%items" @onready var energyLabel: Label = $"%energy" @onready var energyMaxLabel: Label = $"%energyMax" diff --git a/scripts/Statemachine/WeaponName.gd b/scripts/Statemachine/WeaponName.gd index f67a0b3..3cd2d4e 100644 --- a/scripts/Statemachine/WeaponName.gd +++ b/scripts/Statemachine/WeaponName.gd @@ -13,6 +13,7 @@ enum TypeTopic { IMPACT, ENERGY, TEMPERATURE, + MAGIC, } @export var displayName: String = "未命名武器" @@ -50,11 +51,13 @@ enum TypeTopic { TypeTopic.IMPACT: "冲击", TypeTopic.ENERGY: "能量", TypeTopic.TEMPERATURE: "熔融", + TypeTopic.MAGIC: "魔法", } @export var typeTopicColorMap = { TypeTopic.IMPACT: Color(), TypeTopic.ENERGY: Color(), TypeTopic.TEMPERATURE: Color(), + TypeTopic.MAGIC: Color(), } @onready var qualityLabel: Label = $"%quality" diff --git a/scripts/Tools/ItemStore.gd b/scripts/Tools/ItemStore.gd index 06417ca..fe7505b 100644 --- a/scripts/Tools/ItemStore.gd +++ b/scripts/Tools/ItemStore.gd @@ -4,17 +4,20 @@ class_name ItemStore enum ItemType { BASEBALL, BASKETBALL, - APPLE + APPLE, + BEACHBALL } static var nameMap = { ItemType.BASEBALL: "棒球", ItemType.BASKETBALL: "篮球", - ItemType.APPLE: "苹果" + ItemType.APPLE: "苹果", + ItemType.BEACHBALL: "沙滩球" } static var idMap = { ItemType.BASEBALL: "baseball", ItemType.BASKETBALL: "basketball", - ItemType.APPLE: "apple" + ItemType.APPLE: "apple", + ItemType.BEACHBALL: "beachball" } static func getTexture(type: ItemType) -> Texture2D: return load("res://resources/items/%s.svg" % idMap[type])