1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00

Compare commits

..

14 Commits

Author SHA1 Message Date
fallingshrimp 52a6f6b3c5 refactor(EntityBase): 移除发布模式下武器子节点的释放逻辑
由于武器子节点在发布模式下隐藏而非释放,移除了冗余的queue_free调用以简化代码
2026-05-05 14:46:55 +08:00
fallingshrimp 75adfed454 feat(角色): 为角色添加默认武器并调整死亡逻辑
为HCN、Lynx和MuyangDog角色添加默认武器
移除发布模式下自动添加紫色水晶武器的逻辑
调整死亡逻辑,使召唤物也能被正确释放
2026-05-05 14:46:27 +08:00
fallingshrimp 0d3c1790af feat(相机): 添加鼠标位置对相机偏移的影响
实现鼠标位置影响相机偏移的功能,使相机能够根据鼠标在屏幕上的位置进行轻微偏移,提升游戏交互体验
2026-05-05 12:37:06 +08:00
fallingshrimp 15e5bcb5bc refactor(EntityBase): 移除调试用的print语句
清理调试代码,提升代码整洁度
2026-05-05 12:25:16 +08:00
fallingshrimp 11a293378c refactor(UI): 优化字段显示逻辑并添加平滑相机移动
将字段显示和隐藏逻辑提取为独立方法
为相机添加位置平滑效果
在游戏重启时重置初始饲料选择状态
2026-05-05 12:24:45 +08:00
fallingshrimp 7e48372902 1 2026-05-05 12:19:12 +08:00
fallingshrimp d039e252f6 feat(android): 添加Android导出配置并启用ETC2/ASTC纹理压缩
- 在project.godot中启用ETC2/ASTC纹理压缩
- 为角色纹理添加ETC2格式支持
- 新增完整的Android平台导出配置预设
2026-05-05 11:29:00 +08:00
fallingshrimp f12a5ee43a chore: 在.gitignore中添加android目录
忽略android构建目录以避免不必要的版本控制
2026-05-05 10:57:20 +08:00
fallingshrimp 2f3912da34 fix(Feed): 修复countOf函数中乘数应用的逻辑错误
当基础值为正数时使用乘法,为负数时使用除法,确保计算结果的正确性
2026-05-05 07:31:35 +08:00
fallingshrimp 75fbef8895 fix(EntityBase): 修复玩家角色死亡时被立即移除的问题
修改tryDie方法,仅当非玩家角色时才调用queue_free
同时更新牧羊犬角色的标语和配置
2026-05-05 07:14:41 +08:00
fallingshrimp 14deb2de71 feat: 添加暂停面板类名并优化字段显示逻辑
修复TipBox销毁时的动画冲突问题
重构游戏重启逻辑以包含库存保存
移除GameOver面板中的重复库存保存代码
优化UIState中的字段显示控制和提示清除功能
2026-05-05 07:04:32 +08:00
fallingshrimp cc103f274b fix: 调整MuyangDog的子弹检测范围并修复UIState字段显示问题
修复MuyangDog角色子弹检测范围从400减少到300以平衡游戏难度
在UIState中添加字段动画播放状态检查,防止动画冲突
2026-05-05 06:54:09 +08:00
fallingshrimp 30527a18a8 feat: 添加游戏控制和管理功能
- 新增GameControl节点用于统一处理游戏重启和退出
- 添加GameBusManager管理游戏重启时的资源清理
- 修改Pause和GameOver面板使用新的GameControl
- 为EffectController和ItemDropped添加分组管理
- 统一使用WorldManager管理游戏时间
2026-05-05 06:51:48 +08:00
fallingshrimp f6e71507ce chore: 清理无用文件和更新游戏规则脚本
删除不再需要的图片、批处理文件和日志文件
更新todo.md移除已完成的任务项
在GameRule.gd中添加helpText静态变量
2026-05-05 06:24:55 +08:00
42 changed files with 411 additions and 160 deletions
+2 -1
View File
@@ -2,4 +2,5 @@
.codebuddy
build/*
!build/.gitkeep
*.zip
*.zip
android
+3 -2
View File
@@ -17,11 +17,12 @@ corner_detail = 1
[node name="MuyangDog" unique_id=1046363300 instance=ExtResource("1_wq25g")]
theme_override_styles/panel = SubResource("StyleBoxFlat_fi2nw")
displayName = "牧羊犬"
slogan = "以身挡险,恪守使命不离不弃"
slogan = "恪守使命不离不弃"
avatar = ExtResource("2_fi2nw")
description = "每3秒发动格挡,弹反一切子弹。"
fields = Array[int]([0, 8, 3])
fieldValues = Array[float]([50.0, 0.15, -0.2])
clickToRebuild = true
[node name="avatarTexture" parent="wrapper" parent_id_path=PackedInt32Array(2023039659) index="0" unique_id=1334645594]
texture = ExtResource("2_fi2nw")
@@ -30,7 +31,7 @@ texture = ExtResource("2_fi2nw")
text = "牧羊犬"
[node name="sloganLabel" parent="wrapper/infoContainer/VBoxContainer" parent_id_path=PackedInt32Array(533915880) index="1" unique_id=280562204]
text = "“以身挡险,恪守使命不离不弃”"
text = "“恪守使命不离不弃”"
[node name="descriptionLabel" parent="wrapper/infoContainer" parent_id_path=PackedInt32Array(143242635) index="1" unique_id=808054282]
text = "每3秒发动格挡,弹反一切子弹。"
+3
View File
@@ -2,7 +2,10 @@
[ext_resource type="PackedScene" uid="uid://bs863g2s8r770" path="res://components/Abstracts/PlayerBase.tscn" id="1_eeneu"]
[ext_resource type="Script" uid="uid://bevc4f6apql4t" path="res://scripts/Contents/Characters/HCN.gd" id="2_f7uj3"]
[ext_resource type="PackedScene" uid="uid://wl8u5m52708w" path="res://components/Weapons/LGBT.tscn" id="3_2fpmn"]
[node name="HCN" unique_id=1711205167 instance=ExtResource("1_eeneu")]
script = ExtResource("2_f7uj3")
displayName = "氰化氢"
[node name="LGBT" parent="weaponStore" index="0" unique_id=1938660022 instance=ExtResource("3_2fpmn")]
+3
View File
@@ -2,7 +2,10 @@
[ext_resource type="PackedScene" uid="uid://bs863g2s8r770" path="res://components/Abstracts/PlayerBase.tscn" id="1_ns0m5"]
[ext_resource type="Script" uid="uid://b8g0hkqvyeptg" path="res://scripts/Contents/Characters/Lynx.gd" id="2_d6nve"]
[ext_resource type="PackedScene" uid="uid://frwt0fgrpskb" path="res://components/Weapons/Meowmere.tscn" id="3_nitbu"]
[node name="Lynx" unique_id=1711205167 instance=ExtResource("1_ns0m5")]
script = ExtResource("2_d6nve")
displayName = "猞猁"
[node name="Meowmere" parent="weaponStore" index="0" unique_id=1965287972 instance=ExtResource("3_nitbu")]
+3
View File
@@ -2,7 +2,10 @@
[ext_resource type="PackedScene" uid="uid://bs863g2s8r770" path="res://components/Abstracts/PlayerBase.tscn" id="1_y3l4w"]
[ext_resource type="Script" uid="uid://bbmb572iba42l" path="res://scripts/Contents/Characters/MuyangDog.gd" id="2_mr6nm"]
[ext_resource type="PackedScene" uid="uid://u0djqwuuysp8" path="res://components/Weapons/Volcano.tscn" id="3_e236u"]
[node name="MuyangDog" unique_id=1711205167 instance=ExtResource("1_y3l4w")]
script = ExtResource("2_mr6nm")
displayName = "牧羊犬"
[node name="Volcano" parent="weaponStore" index="0" unique_id=204992396 instance=ExtResource("3_e236u")]
@@ -1,9 +1,10 @@
[gd_scene format=3 uid="uid://beo6s1kudbbve"]
[gd_scene format=3 uid="uid://b14x2fai2bagp"]
[ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_u2ynr"]
[ext_resource type="Script" uid="uid://bub7ku5qf2tpo" path="res://scripts/Contents/Panels/GameOver.gd" id="2_6cd45"]
[ext_resource type="FontFile" uid="uid://v3frxpuvtj5o" path="res://resources/fonts/syht-bold.ttf" id="3_2arur"]
[ext_resource type="AudioStream" uid="uid://dbso1w8hvgilg" path="res://resources/sounds/effect/Lose.wav" id="3_n4aax"]
[ext_resource type="PackedScene" uid="uid://braggv3vafd83" path="res://components/UI/GameControl.tscn" id="4_idc4g"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7gbuu"]
bg_color = Color(1, 0, 0, 0.3)
@@ -48,21 +49,9 @@ text = "[color=gray]死亡原因[/color]"
fit_content = true
autowrap_mode = 0
[node name="gameControl" type="HBoxContainer" parent="content/wrapper/container/wrapper" index="1" unique_id=2129714003]
layout_mode = 2
alignment = 1
[node name="returnBtn" type="Button" parent="content/wrapper/container/wrapper/gameControl" index="0" unique_id=1955688444]
[node name="gameControl" parent="content/wrapper/container/wrapper/death" index="2" unique_id=1187018703 instance=ExtResource("4_idc4g")]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
text = "重新开始游戏"
[node name="exitBtn" type="Button" parent="content/wrapper/container/wrapper/gameControl" index="1" unique_id=1303303813]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
text = "退出游戏"
[node name="audio" type="AudioStreamPlayer2D" parent="." index="2" unique_id=2020590816]
unique_name_in_owner = true
@@ -1,14 +1,15 @@
[gd_scene load_steps=5 format=3 uid="uid://cksonrrx38k36"]
[gd_scene format=3 uid="uid://cksonrrx38k36"]
[ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_q0gd0"]
[ext_resource type="Script" path="res://scripts/Contents/Panels/Pause.gd" id="2_lg6qs"]
[ext_resource type="Script" uid="uid://ba0tgtpjp34k8" path="res://scripts/Contents/Panels/Pause.gd" id="2_lg6qs"]
[ext_resource type="FontFile" uid="uid://v3frxpuvtj5o" path="res://resources/fonts/syht-bold.ttf" id="3_jxeor"]
[ext_resource type="PackedScene" uid="uid://braggv3vafd83" path="res://components/UI/GameControl.tscn" id="4_tij4f"]
[sub_resource type="LabelSettings" id="LabelSettings_hsvpc"]
font = ExtResource("3_jxeor")
font_size = 50
[node name="Pause" instance=ExtResource("1_q0gd0")]
[node name="Pause" unique_id=518412591 instance=ExtResource("1_q0gd0")]
offset_top = 0.0
offset_bottom = 0.0
script = ExtResource("2_lg6qs")
@@ -16,14 +17,12 @@ script = ExtResource("2_lg6qs")
[node name="wrapper" parent="content" index="1"]
theme_override_constants/separation = 10
[node name="text" type="Label" parent="content/wrapper" index="0"]
[node name="text" type="Label" parent="content/wrapper" index="0" unique_id=884780519]
layout_mode = 2
size_flags_horizontal = 4
text = "已暂停"
label_settings = SubResource("LabelSettings_hsvpc")
[node name="aboutBtn" type="Button" parent="content/wrapper" index="1"]
[node name="gameControl" parent="content/wrapper" index="1" unique_id=1187018703 instance=ExtResource("4_tij4f")]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
text = "关于↗"
+20 -15
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://dmxi1ikn6avig"]
[gd_scene format=3 uid="uid://dmxi1ikn6avig"]
[ext_resource type="Script" uid="uid://d2oyyyg0b4qqd" path="res://scripts/Tools/Managers/WorldManager.gd" id="1_lxsxj"]
[ext_resource type="PackedScene" uid="uid://dfwg750a47ggx" path="res://components/Scenes/UI.tscn" id="2_04cdd"]
@@ -66,57 +66,62 @@ _data = {
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_lu72f"]
normal = Vector2(0, 1)
[node name="world" type="Node2D"]
[node name="world" type="Node2D" unique_id=1992792389]
y_sort_enabled = true
texture_filter = 1
script = ExtResource("1_lxsxj")
metadata/_edit_vertical_guides_ = [-1.0, 57.0]
[node name="spawner" type="MultiplayerSpawner" parent="."]
[node name="spawner" type="MultiplayerSpawner" parent="." unique_id=1891214291]
unique_name_in_owner = true
spawn_path = NodePath("..")
[node name="UI" parent="." instance=ExtResource("2_04cdd")]
[node name="UI" parent="." unique_id=1312059514 instance=ExtResource("2_04cdd")]
[node name="camera" type="Camera2D" parent="."]
[node name="camera" type="Camera2D" parent="." unique_id=996511427]
process_mode = 3
process_callback = 0
limit_left = -2400
limit_top = -1800
limit_right = 2400
limit_bottom = 1800
position_smoothing_enabled = true
drag_horizontal_enabled = true
drag_vertical_enabled = true
editor_draw_limits = true
script = ExtResource("5_mk7bv")
constantOffset = Vector2(0, -80)
[node name="animator" type="AnimationPlayer" parent="camera"]
[node name="animator" type="AnimationPlayer" parent="camera" unique_id=619200978]
unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_44ixa")
}
libraries/ = SubResource("AnimationLibrary_44ixa")
[node name="map" type="StaticBody2D" parent="." groups=["map"]]
[node name="map" type="StaticBody2D" parent="." unique_id=385091617 groups=["map"]]
collision_layer = 6
collision_mask = 6
metadata/_edit_lock_ = true
[node name="background" type="Sprite2D" parent="map"]
[node name="background" type="Sprite2D" parent="map" unique_id=792319336]
z_index = -100
scale = Vector2(5, 5)
texture = ExtResource("4_oy4jj")
metadata/_edit_lock_ = true
[node name="borderTop" type="CollisionShape2D" parent="map"]
[node name="borderTop" type="CollisionShape2D" parent="map" unique_id=320842136]
position = Vector2(0, -1800)
shape = SubResource("WorldBoundaryShape2D_lu72f")
[node name="borderTop2" type="CollisionShape2D" parent="map"]
[node name="borderTop2" type="CollisionShape2D" parent="map" unique_id=1208131017]
position = Vector2(0, 1800)
rotation = 3.1415927
shape = SubResource("WorldBoundaryShape2D_lu72f")
[node name="borderTop3" type="CollisionShape2D" parent="map"]
[node name="borderTop3" type="CollisionShape2D" parent="map" unique_id=585247179]
position = Vector2(2400, 0)
rotation = 1.5707964
shape = SubResource("WorldBoundaryShape2D_lu72f")
[node name="borderTop4" type="CollisionShape2D" parent="map"]
[node name="borderTop4" type="CollisionShape2D" parent="map" unique_id=320391894]
position = Vector2(-2400, 0)
rotation = -1.5707964
shape = SubResource("WorldBoundaryShape2D_lu72f")
+19
View File
@@ -0,0 +1,19 @@
[gd_scene format=3 uid="uid://braggv3vafd83"]
[ext_resource type="Script" uid="uid://b63fkg0waovo" path="res://scripts/Statemachine/GameControl.gd" id="1_t5a04"]
[node name="GameControl" type="HBoxContainer" unique_id=1187018703]
size_flags_horizontal = 4
script = ExtResource("1_t5a04")
[node name="returnBtn" type="Button" parent="." unique_id=2089710932]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
text = "重新开始游戏"
[node name="exitBtn" type="Button" parent="." unique_id=100260653]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
text = "退出游戏"
+226
View File
@@ -166,3 +166,229 @@ progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color(0, 0, 0, 1)
threads/emscripten_pool_size=8
threads/godot_pool_size=4
[preset.3]
name="Android"
platform="Android"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="build/android/DLH.apk"
patches=PackedStringArray()
patch_delta_encoding=false
patch_delta_compression_level_zstd=19
patch_delta_min_reduction=0.1
patch_delta_include_filters="*"
patch_delta_exclude_filters=""
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.3.options]
custom_template/debug=""
custom_template/release=""
gradle_build/use_gradle_build=false
gradle_build/gradle_build_directory=""
gradle_build/android_source_template=""
gradle_build/compress_native_libraries=false
gradle_build/export_format=0
gradle_build/min_sdk=""
gradle_build/target_sdk=""
gradle_build/custom_theme_attributes={}
architectures/armeabi-v7a=false
architectures/arm64-v8a=true
architectures/x86=false
architectures/x86_64=false
version/code=1
version/name=""
package/unique_name="top.fshrimp.doglynxhcn"
package/name="犬,猞猁,与氰化氢"
package/signed=true
package/app_category=2
package/retain_data_on_uninstall=false
package/exclude_from_recents=false
package/show_in_android_tv=false
package/show_in_app_library=true
package/show_as_launcher_app=false
launcher_icons/main_192x192=""
launcher_icons/adaptive_foreground_432x432=""
launcher_icons/adaptive_background_432x432=""
launcher_icons/adaptive_monochrome_432x432=""
graphics/opengl_debug=false
shader_baker/enabled=false
xr_features/xr_mode=0
gesture/swipe_to_dismiss=false
screen/immersive_mode=true
screen/edge_to_edge=true
screen/support_small=true
screen/support_normal=true
screen/support_large=true
screen/support_xlarge=true
screen/background_color=Color(0, 0, 0, 1)
user_data_backup/allow=true
command_line/extra_args=""
apk_expansion/enable=false
apk_expansion/SALT=""
apk_expansion/public_key=""
permissions/custom_permissions=PackedStringArray()
permissions/access_checkin_properties=false
permissions/access_coarse_location=false
permissions/access_fine_location=false
permissions/access_location_extra_commands=false
permissions/access_media_location=false
permissions/access_mock_location=false
permissions/access_network_state=false
permissions/access_surface_flinger=false
permissions/access_wifi_state=false
permissions/account_manager=false
permissions/add_voicemail=false
permissions/authenticate_accounts=false
permissions/battery_stats=false
permissions/bind_accessibility_service=false
permissions/bind_appwidget=false
permissions/bind_device_admin=false
permissions/bind_input_method=false
permissions/bind_nfc_service=false
permissions/bind_notification_listener_service=false
permissions/bind_print_service=false
permissions/bind_remoteviews=false
permissions/bind_text_service=false
permissions/bind_vpn_service=false
permissions/bind_wallpaper=false
permissions/bluetooth=false
permissions/bluetooth_admin=false
permissions/bluetooth_privileged=false
permissions/brick=false
permissions/broadcast_package_removed=false
permissions/broadcast_sms=false
permissions/broadcast_sticky=false
permissions/broadcast_wap_push=false
permissions/call_phone=false
permissions/call_privileged=false
permissions/camera=false
permissions/capture_audio_output=false
permissions/capture_secure_video_output=false
permissions/capture_video_output=false
permissions/change_component_enabled_state=false
permissions/change_configuration=false
permissions/change_network_state=false
permissions/change_wifi_multicast_state=false
permissions/change_wifi_state=false
permissions/clear_app_cache=false
permissions/clear_app_user_data=false
permissions/control_location_updates=false
permissions/delete_cache_files=false
permissions/delete_packages=false
permissions/device_power=false
permissions/diagnostic=false
permissions/disable_keyguard=false
permissions/dump=false
permissions/expand_status_bar=false
permissions/factory_test=false
permissions/flashlight=false
permissions/force_back=false
permissions/get_accounts=false
permissions/get_package_size=false
permissions/get_tasks=false
permissions/get_top_activity_info=false
permissions/global_search=false
permissions/hardware_test=false
permissions/inject_events=false
permissions/install_location_provider=false
permissions/install_packages=false
permissions/install_shortcut=false
permissions/internal_system_window=false
permissions/internet=false
permissions/kill_background_processes=false
permissions/location_hardware=false
permissions/manage_accounts=false
permissions/manage_app_tokens=false
permissions/manage_documents=false
permissions/manage_external_storage=false
permissions/manage_media=false
permissions/master_clear=false
permissions/media_content_control=false
permissions/modify_audio_settings=false
permissions/modify_phone_state=false
permissions/mount_format_filesystems=false
permissions/mount_unmount_filesystems=false
permissions/nfc=false
permissions/persistent_activity=false
permissions/post_notifications=false
permissions/process_outgoing_calls=false
permissions/read_calendar=false
permissions/read_call_log=false
permissions/read_contacts=false
permissions/read_external_storage=false
permissions/read_frame_buffer=false
permissions/read_history_bookmarks=false
permissions/read_input_state=false
permissions/read_logs=false
permissions/read_media_audio=false
permissions/read_media_images=false
permissions/read_media_video=false
permissions/read_media_visual_user_selected=false
permissions/read_phone_state=false
permissions/read_profile=false
permissions/read_sms=false
permissions/read_social_stream=false
permissions/read_sync_settings=false
permissions/read_sync_stats=false
permissions/read_user_dictionary=false
permissions/reboot=false
permissions/receive_boot_completed=false
permissions/receive_mms=false
permissions/receive_sms=false
permissions/receive_wap_push=false
permissions/record_audio=false
permissions/reorder_tasks=false
permissions/restart_packages=false
permissions/send_respond_via_message=false
permissions/send_sms=false
permissions/set_activity_watcher=false
permissions/set_alarm=false
permissions/set_always_finish=false
permissions/set_animation_scale=false
permissions/set_debug_app=false
permissions/set_orientation=false
permissions/set_pointer_speed=false
permissions/set_preferred_applications=false
permissions/set_process_limit=false
permissions/set_time=false
permissions/set_time_zone=false
permissions/set_wallpaper=false
permissions/set_wallpaper_hints=false
permissions/signal_persistent_processes=false
permissions/status_bar=false
permissions/subscribed_feeds_read=false
permissions/subscribed_feeds_write=false
permissions/system_alert_window=false
permissions/transmit_ir=false
permissions/uninstall_shortcut=false
permissions/update_device_stats=false
permissions/use_credentials=false
permissions/use_sip=false
permissions/vibrate=false
permissions/wake_lock=false
permissions/write_apn_settings=false
permissions/write_calendar=false
permissions/write_call_log=false
permissions/write_contacts=false
permissions/write_external_storage=false
permissions/write_gservices=false
permissions/write_history_bookmarks=false
permissions/write_profile=false
permissions/write_secure_settings=false
permissions/write_settings=false
permissions/write_sms=false
permissions/write_social_stream=false
permissions/write_sync_settings=false
permissions/write_user_dictionary=false
-5
View File
@@ -1,5 +0,0 @@
# Playlog
## 2025/9/30
平衡性已调整,可3个boss同窗无伤打完。
-4
View File
@@ -1,4 +0,0 @@
@echo off
cd build/web
python -m http.server 8080
+1
View File
@@ -135,3 +135,4 @@ locale/locale_filter_mode=0
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
textures/vram_compression/import_etc2_astc=true
@@ -4,15 +4,16 @@ importer="texture"
type="CompressedTexture2D"
uid="uid://b1aq0k7tf1p1"
path.s3tc="res://.godot/imported/kernyr.jpg-d82cf548a25a07dbd282dd92971a45c3.s3tc.ctex"
path.etc2="res://.godot/imported/kernyr.jpg-d82cf548a25a07dbd282dd92971a45c3.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
[deps]
source_file="res://resources/characters/kernyr/kernyr.jpg"
dest_files=["res://.godot/imported/kernyr.jpg-d82cf548a25a07dbd282dd92971a45c3.s3tc.ctex"]
dest_files=["res://.godot/imported/kernyr.jpg-d82cf548a25a07dbd282dd92971a45c3.s3tc.ctex", "res://.godot/imported/kernyr.jpg-d82cf548a25a07dbd282dd92971a45c3.etc2.ctex"]
[params]
View File
+1 -1
View File
@@ -6,7 +6,7 @@ func ai():
super.ai()
if parryCounter.isCooldowned():
var track = getTrackingAnchor()
var bullet = BulletTool.findClosetBulletCanDamage(track, get_tree(), self , 400)
var bullet = BulletTool.findClosetBulletCanDamage(track, get_tree(), self , 300)
if is_instance_valid(bullet):
BulletBase.generate(ComponentManager.getBullet("Parrier"), self , track, track.angle_to_point(bullet.position))
parryCounter.start()
+2 -2
View File
@@ -52,7 +52,7 @@ func tryLaunch(action: String, weaponIndex: int):
var weapon = weapons[weaponIndex]
if weapon.emitType == Weapon.EmitType.CHARGE:
if weapon.canAttackBy(self ):
chargeStartTime[weaponIndex] = Time.get_ticks_msec()
chargeStartTime[weaponIndex] = WorldManager.getTime()
chargeParticle.emitting = true
chargeParticle.speed_scale = 1
elif weapon.emitType == Weapon.EmitType.CLICK_SHOOT || weapon.emitType == Weapon.EmitType.HOLD_LOOP:
@@ -70,7 +70,7 @@ func tryLaunch(action: String, weaponIndex: int):
if weapon.emitType == Weapon.EmitType.CHARGE:
if chargeStartTime.has(weaponIndex):
var startTime = chargeStartTime[weaponIndex]
var endTime = Time.get_ticks_msec()
var endTime = WorldManager.getTime()
var chargedTime = endTime - startTime
chargeStartTime.erase(weaponIndex)
weapon.chargedTime = chargedTime * self.fields.get(FieldStore.Entity.CHARGE_SPEED)
+2 -2
View File
@@ -52,7 +52,7 @@ func tryLaunch(action: String, weaponIndex: int):
var weapon = weapons[weaponIndex]
if weapon.emitType == Weapon.EmitType.CHARGE:
if weapon.canAttackBy(self ):
chargeStartTime[weaponIndex] = Time.get_ticks_msec()
chargeStartTime[weaponIndex] = WorldManager.getTime()
chargeParticle.emitting = true
chargeParticle.speed_scale = 1
elif weapon.emitType == Weapon.EmitType.CLICK_SHOOT || weapon.emitType == Weapon.EmitType.HOLD_LOOP:
@@ -70,7 +70,7 @@ func tryLaunch(action: String, weaponIndex: int):
if weapon.emitType == Weapon.EmitType.CHARGE:
if chargeStartTime.has(weaponIndex):
var startTime = chargeStartTime[weaponIndex]
var endTime = Time.get_ticks_msec()
var endTime = WorldManager.getTime()
var chargedTime = endTime - startTime
chargeStartTime.erase(weaponIndex)
weapon.chargedTime = chargedTime * self.fields.get(FieldStore.Entity.CHARGE_SPEED)
+2 -21
View File
@@ -3,30 +3,11 @@ extends FullscreenPanelBase
@onready var audio: AudioStreamPlayer2D = $%audio
@onready var deadreason: RichTextLabel = $%deadreason
@onready var returnBtn: Button = $%returnBtn
@onready var exitBtn: Button = $%exitBtn
func _ready():
returnBtn.pressed.connect(
func():
returnBtn.disabled = true
for bullet in get_tree().get_nodes_in_group("bullets"):
bullet.queue_free()
for entity in get_tree().get_nodes_in_group("entities"):
entity.queue_free()
UIState.setPanel("Starter")
)
exitBtn.pressed.connect(
func():
get_tree().quit()
)
@onready var gameControl: GameControl = $%gameControl
func beforeOpen(args: Array = []):
audio.play()
var reasonTemplate = MathTool.randomChoiceFrom(GameRule.deadReasons)
deadreason.text = ("[color=gray]" + reasonTemplate + "凶手是[b]%s[/b]的[b]%s[/b]。[/color]") % args
for item in OutGameStorage.inventory:
OutGameStorage.inventory[item] += UIState.player.inventory[item]
func afterOpen(_args: Array = []):
returnBtn.disabled = false
exitBtn.disabled = false
gameControl.enable()
+4 -6
View File
@@ -1,10 +1,8 @@
@tool
extends FullscreenPanelBase
class_name PausePanel
@onready var aboutBtn: Button = $"%aboutBtn"
@onready var gameControl: GameControl = $%gameControl
func _ready():
aboutBtn.pressed.connect(
func():
UIState.setPanel("Thanks")
)
func afterOpen(_args: Array = []):
gameControl.enable()
+4 -1
View File
@@ -89,7 +89,10 @@ func startSingleplayerGame():
), OutGameStorage.upgradableFieldsValue)
UIState.player = EntityBase.generatePlayer(playerNameInput.text, selectedCharacter, extras)
WorldManager.rootNode.spawnWave(Vector2.ZERO)
UIState.setPanel("CompilingTip")
if buildingShader:
UIState.setPanel("CompilingTip")
else:
UIState.setPanel("SelectInitialFeed")
func _ready():
historyStack = Composables.useHistoryStack(playerNameInput)
+2 -2
View File
@@ -8,10 +8,10 @@ var distance: float = 200
var bullets: Array[BulletBase] = []
func start():
startTime = Time.get_ticks_msec()
startTime = WorldManager.getTime()
running = true
func lifetime():
return Time.get_ticks_msec() - startTime
return WorldManager.getTime() - startTime
func getStateAngle(index: int):
return lifetime() / period * deg_to_rad(360) - deg_to_rad(360.0 * index / len(bullets))
func forceFilter():
+1
View File
@@ -59,4 +59,5 @@ static func create(scene: PackedScene, spawnPosition: Vector2, parent: Node = nu
parent.add_child(cloned)
else:
WorldManager.rootNode.add_child(cloned)
cloned.add_to_group("effects")
return cloned
+2 -6
View File
@@ -136,10 +136,6 @@ func _ready():
if isPlayer():
if displayName == MultiplayerState.playerName:
UIState.player = self
if WorldManager.isRelease():
for i in weaponStore.get_children():
i.queue_free()
weaponStore.add_child(ComponentManager.getWeapon("PurpleCrystal").instantiate())
for i in weaponStore.get_children():
i.hide()
weapons.append(i)
@@ -448,7 +444,8 @@ func tryDie(by: BulletBase = null):
UIState.showTip("[b]%s[/b] 已被打败!" % displayName, TipBox.MessageType.CONGRATULATION)
elif isPlayer():
UIState.showTip("[b]%s[/b] 似了😭。" % displayName, TipBox.MessageType.ERROR)
queue_free()
if !isPlayer() || isSummon():
queue_free()
func tryHeal(count: float):
playSound("heal")
healed.emit(heal(count * fields.get(FieldStore.Entity.HEAL_ABILITY)))
@@ -563,7 +560,6 @@ static func findPlayer(playerName: String) -> EntityBase:
static func generatePlayer(playerName: String, character: String, extraFields: Dictionary = {}) -> EntityBase:
var player = generate(ComponentManager.getCharacter(character), Vector2.ZERO, false, false, true, playerName)
player.name = "Player_%s" % playerName
print(extraFields)
var feed = ComponentManager.getAbstract("FeedCardBase").instantiate() as Feed
for field in extraFields:
feed.fields.append(field)
+25
View File
@@ -0,0 +1,25 @@
extends Control
class_name GameControl
@onready var returnBtn: Button = $%returnBtn
@onready var exitBtn: Button = $%exitBtn
func _ready():
returnBtn.pressed.connect(
func():
disable()
GameBusManager.restart(get_tree())
)
exitBtn.pressed.connect(
func():
disable()
get_tree().quit()
)
enable()
func enable():
returnBtn.disabled = false
exitBtn.disabled = false
func disable():
returnBtn.disabled = true
exitBtn.disabled = true
+1
View File
@@ -0,0 +1 @@
uid://b63fkg0waovo
+1
View File
@@ -64,6 +64,7 @@ static func generate(
WorldManager.rootNode.call_deferred("add_child", instance)
instance.add_to_group("drops")
instance.refindPlayer(WorldManager.tree)
instance.add_to_group("items")
return instance
static func getDrops() -> Array[ItemDropped]:
var result: Array[ItemDropped] = []
+1
View File
@@ -31,6 +31,7 @@ func _process(_delta):
label.text = text
func destroy():
if animator.is_playing(): return
animator.play("hide")
await animator.animation_finished
queue_free()
+30 -11
View File
@@ -15,6 +15,8 @@ static var tips: VBoxContainer
static var itemsContainer: Control
static var energyContainer: Control
static var showingFields: bool = false
func _ready():
bossbar = $%bossbar
panels = $%panels
@@ -43,17 +45,14 @@ func _physics_process(_delta):
bossbar.visible = true
itemsContainer.visible = true
energyContainer.visible = true
if Input.is_action_just_pressed("showFields"):
for i in fields.get_children():
fields.remove_child(i)
for i in player.fields:
if player.fields[i] == EntityBase.TITLE_FLAG:
fields.add_child(QuickUI.graySmallText(i))
else:
fields.add_child(FieldShow.create(i, player.fields[i], false, player, true))
fieldsAnimator.play("show")
if Input.is_action_just_released("showFields"):
fieldsAnimator.play("hide")
if !fieldsAnimator.is_playing():
if showingFields:
if Input.is_action_just_released("showFields") || !(currentPanel is PausePanel):
hideFields()
else:
if Input.is_action_just_pressed("showFields") || currentPanel is PausePanel:
showFields()
if Input.is_action_just_pressed("pause"):
if currentPanel:
if currentPanel is MakeFeedPanel:
@@ -92,8 +91,28 @@ static func setPanel(targetName: String = "", args: Array = []):
panel.hidePanel()
static func closeCurrentPanel():
setPanel()
static func showTip(text: String, messageType: TipBox.MessageType = TipBox.MessageType.INFO):
var box = TipBox.create(text, messageType)
tips.add_child(box)
await box.animator.animation_finished
await TickTool.millseconds(500 * len(text))
box.destroy()
static func clearTips():
for child in tips.get_children():
if child is TipBox:
child.destroy()
static func showFields():
showingFields = true
for i in fields.get_children():
fields.remove_child(i)
for i in player.fields:
if player.fields[i] == EntityBase.TITLE_FLAG:
fields.add_child(QuickUI.graySmallText(i))
else:
fields.add_child(FieldShow.create(i, player.fields[i], false, player, true))
fieldsAnimator.play("show")
static func hideFields():
showingFields = false
fieldsAnimator.play("hide")
+2 -1
View File
@@ -72,7 +72,8 @@ func apply(entity: EntityBase):
selected.emit(allHave)
return allHave
func countOf(index: int) -> int:
return ceil(costCounts[index] * multipiler())
var base = costCounts[index]
return ceil(base * multipiler()) if base > 0 else floor(base / multipiler())
func multipiler() -> float:
if is_instance_valid(UIState.player):
return 1 - UIState.player.fields.get(FieldStore.Entity.PRICE_REDUCTION)
+1
View File
@@ -1,6 +1,7 @@
class_name GameRule
static var deadReasons: Array = JsonTool.parseJson("res://resources/constants/deadReasons.json")
static var helpText: String
static var difficultyRange: Vector2 = Vector2(-20, 50) # 难度倍数范围,包括最小值和最大值,负数则降低难度
static var difficulty: float = 1 # 难度倍数,可以写小数
static var allowFriendlyFire: bool = false # 是否允许友军伤害
+6 -2
View File
@@ -7,6 +7,7 @@ class_name CameraManager
@onready var animator: AnimationPlayer = $"%animator"
var shakeIntensity: float = 0
var shaking: bool = false
static var instance: CameraManager = null
@@ -16,7 +17,7 @@ func _physics_process(_delta):
if is_instance_valid(UIState.player):
position = UIState.player.position + constantOffset
position += MathTool.sampleInCircle(shakeIntensity)
offset += ((get_global_mouse_position() - UIState.player.position).clampf(-100, 100) - offset) * 0.15
position += MouseTool.getPositionByScreen(Vector2.ONE * 0.5, self ) / 2
static func shake(millseconds: float, intensity: float = 10, steper: Callable = func(currentValue, _totalValue, _restPercent): return currentValue):
if StarterPanel.buildingShader: return
@@ -25,8 +26,11 @@ static func shake(millseconds: float, intensity: float = 10, steper: Callable =
await TickTool.until(
func():
instance.shakeIntensity = steper.call(instance.shakeIntensity, intensity, 1 - (WorldManager.getTime() - startTime) / millseconds)
return WorldManager.getTime() - startTime >= millseconds
return WorldManager.getTime() - startTime >= millseconds || !instance.shaking
)
instance.shakeIntensity = 0
static func shakeStop():
instance.shaking = false
instance.shakeIntensity = 0
static func playAnimation(animation: String):
instance.animator.play(animation)
+19
View File
@@ -0,0 +1,19 @@
class_name GameBusManager
static func restart(tree: SceneTree):
for bullet in tree.get_nodes_in_group("bullets"):
bullet.queue_free()
for entity in tree.get_nodes_in_group("entities"):
entity.queue_free()
for effect in tree.get_nodes_in_group("effects"):
effect.queue_free()
for item in tree.get_nodes_in_group("items"):
item.queue_free()
UIState.hideFields()
OutGameStorage.saveInventory()
CameraManager.shakeStop()
WorldManager.timeRestart()
StarterPanel.selectingFeed = true
UIState.setPanel("Starter")
@@ -0,0 +1 @@
uid://cf1agt55tt4pu
+2
View File
@@ -38,6 +38,8 @@ func spawn(node: Node):
func justReturn(data):
return ArrayTool.parseEncodedObject(data)[0]
static func timeRestart():
runningTime = 0
static func getTime():
return runningTime
static func spawnNode(node: Node):
+5
View File
@@ -0,0 +1,5 @@
class_name MouseTool
static func getPositionByScreen(anchor: Vector2, by: Node):
var viewport = by.get_viewport()
return viewport.get_mouse_position() - viewport.get_visible_rect().size * anchor
+1
View File
@@ -0,0 +1 @@
uid://yf2h5ni3gobm
+4
View File
@@ -19,3 +19,7 @@ static var upgradableFieldsLevel = ArrayTool.fill(upgradableFieldsAdvance, func(
static var maxInitialFeedCount: int = 3
static var maxInitialWeaponCount: int = 3
static var inventory = ArrayTool.fill(upgradableFieldsCost, func(_k): return 0)
static func saveInventory():
for item in OutGameStorage.inventory:
OutGameStorage.inventory[item] += UIState.player.inventory[item]
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 KiB

-40
View File
@@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dkawfjwj80sqj"
path="res://.godot/imported/sjt.png-1b93f593cde723b537a6010a0c0d0d60.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sjt.png"
dest_files=["res://.godot/imported/sjt.png-1b93f593cde723b537a6010a0c0d0d60.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
BIN
View File
Binary file not shown.
-15
View File
@@ -1,18 +1,3 @@
# Todo
1. 完成Godockly UGC框架。
2. 设计新boss
## 新boss
主题:强大的防御能力+近战攻击。
### 招式
1. 使用**扫帚**进行4段挥舞攻击,上挑-下批-短戳-突刺(cooldown=6s
2. **扫帚**蓄力0.5s,向玩家冲刺,**距离足够近或冲刺结束**后挥出武器(蓄力+攻击互斥)
3. 召唤3把**扫帚炮**,每0.2s释放发射一柱**灰尘射线**cooldown=10s
4. 召唤**自旋扫帚**,每1秒旋转1圈,此时boss移速+100%cooldown=8s,蓄力)
5. 发射**扫帚回旋镖**,可飞行1秒后回旋(攻击互斥)
6. 发动**格挡**,抵挡玩家的近战或射弹伤害(cooldown=2s
7. 发动**闪避**,侧向冲刺躲避离自身最近的玩家子弹(cooldown=5s