1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-09 05:07:12 +08:00

feat: Enhance game mechanics and structure

- Added `ColorBar` class for visual representation of values.
- Expanded `EntityBase` with new properties: `isBoss` and `weapons`, and implemented damage handling and entity generation methods.
- Updated `EntityStateBar` to use `ColorBar` for health representation.
- Introduced `BulletBase` scene and script for bullet mechanics, including damage handling and generation.
- Created `WorldTool` for managing the game world and root node.
- Implemented `EntityTool` for retrieving entities from hurtboxes.
- Added `GameRule` for managing game rules like friendly fire.
- Updated scene files to reflect new structures and added necessary resources.
This commit is contained in:
2025-08-26 11:39:47 +08:00
parent c6c16d4977
commit ef8fd0db9f
14 changed files with 254 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25" height="22.05604362487793" viewBox="2.5 4.043956756591797 25 22.05604362487793" version="1.1" xml:space="preserve">
<!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch -->
<defs/>
<g>
<title>crystal-a</title>
<desc>Created with Sketch.</desc>
<g id="crystal-a" fill-rule="evenodd">
<g id="Blue-Crystal" fill-rule="nonzero">
<path d="M 3 12.3 C 3 12.3 5.9 7.1 10 5.6 C 10 5.6 17.9 3.8 20.5 4.9 C 20.5 4.9 25.7 8.5 27 10.5 C 27 10.5 20 23.5 16.7 25.5 C 16.7 25.6 4.3 17.7 3 12.3 Z " id="Shape" fill="#7FCCEF" stroke-width="1" stroke="none"/>
<path d="M 27 10.5 C 26.8 10.2 26.5 9.8 26.1 9.5 L 20.6 12.9 L 15.8 18.7 L 16.7 25.6 C 20.1 23.5 27 10.5 27 10.5 Z " id="Shape" fill="#678FE4" stroke-width="1" stroke="none"/>
<path d="M 11.3 13.9 C 11.3 13.9 13.8 22.6 16.7 25.6 C 16.7 25.6 20.4 16.1 20.6 12.9 L 13.8 9.7 L 11.3 13.9 Z " id="Shape" fill="#73B5E4" stroke-width="1" stroke="none"/>
<path d="M 20.5 4.9 C 17.8 3.8 10 5.6 10 5.6 C 6 7.2 3 12.3 3 12.3 C 3 12.3 9.5 13.9 11.3 13.9 C 11.3 13.9 17 14 20.6 12.9 C 23 12.2 24.5 11.9 27 10.5 C 25.7 8.5 20.5 4.9 20.5 4.9 Z " id="Shape" fill="#92D7EF" stroke-width="1" stroke="none"/>
<path d="M 17.2 4.6 C 15.8 4.7 14.3 4.8 13 5.1 L 11.8 7.5 L 11.4 14 C 11.4 14 17.1 14.1 20.7 13 L 18 6.9 L 17.2 4.6 Z " id="Shape" fill="#7FCCEF" stroke-width="1" stroke="none"/>
<path d="M 11.2 9.6 C 10.4 9.6 6.2 10.9 3.3 11.8 C 3.1 12.1 3 12.3 3 12.3 C 3 12.3 9.5 13.9 11.3 13.9 C 11.3 13.9 17 14 20.6 12.9 C 23 12.2 24.5 11.9 27 10.5 C 26.9 10.4 26.9 10.3 26.8 10.2 C 24.4 9.7 20.2 8.8 19.7 8.8 C 19 8.9 12.4 9.6 11.2 9.6 Z " id="Shape" fill="#83CDEF" stroke-width="1" stroke="none"/>
<path d="M 11.8 7.4 L 18.1 7 C 18.1 7 19.9 6.8 20.6 5 C 17.8 3.8 10 5.6 10 5.6 C 10 5.6 10.6 6.5 11.8 7.4 Z " id="Shape" fill="#BEE6F1" stroke-width="1" stroke="none"/>
<path d="M 20.5 4.9 C 20.3 4.8 20 4.7 19.7 4.7 L 18 6.9 L 20.6 12.8 C 23 12.1 24.5 11.8 27 10.4 C 25.7 8.5 20.5 4.9 20.5 4.9 Z " id="Shape" fill="#73B5E4" stroke-width="1" stroke="none"/>
<path d="M 27 10.5 C 27 10.5 26.9 10.8 26.7 11.2 C 26.5 11.7 26.2 12.3 25.9 13.1 C 25.7 13.5 25.5 13.9 25.3 14.3 C 25.1 14.7 24.8 15.2 24.5 15.7 C 24 16.6 23.3 17.6 22.7 18.6 C 22 19.5 21.3 20.5 20.7 21.3 C 20 22.1 19.4 22.9 18.8 23.5 C 17.6 24.8 16.8 25.5 16.8 25.5 C 16.8 25.5 17.6 24.6 18.6 23.3 C 19.1 22.6 19.7 21.8 20.4 21 C 21 20.1 21.7 19.2 22.4 18.3 C 23.1 17.4 23.7 16.4 24.2 15.5 C 24.8 14.6 25.3 13.7 25.7 13 C 26.1 12.3 26.5 11.6 26.7 11.2 C 26.9 10.8 27 10.5 27 10.5 Z " id="Shape" fill="#3B73E4" stroke-width="1" stroke="none"/>
<path d="M 3 12.3 C 3 12.3 3.5 12.3 4.2 12.4 C 4.9 12.5 5.8 12.6 6.7 12.8 C 7.6 13 8.5 13.2 9.2 13.4 C 9.9 13.6 10.3 13.7 10.3 13.7 C 10.3 13.7 9.8 13.8 9.1 13.7 C 8.4 13.6 7.5 13.5 6.6 13.3 C 5.7 13.1 4.8 12.9 4.1 12.7 C 3.4 12.5 3 12.3 3 12.3 Z " id="Shape" fill="#BEE6F1" stroke-width="1" stroke="none"/>
<path d="M 11.5 14.9 C 11.5 14.9 11.8 15.5 12.1 16.3 C 12.5 17.2 12.9 18.3 13.4 19.4 C 13.8 20.5 14.3 21.7 14.6 22.5 C 14.8 22.9 14.9 23.3 15.1 23.5 C 15.3 23.7 15.3 23.8 15.3 23.8 C 15.3 23.8 15.2 23.7 15 23.5 C 14.8 23.3 14.6 23 14.3 22.6 C 13.8 21.8 13.3 20.7 12.8 19.5 C 12.3 18.3 12 17.2 11.7 16.3 C 11.7 15.5 11.5 14.9 11.5 14.9 Z " id="Shape" fill="#BEE6F1" stroke-width="1" stroke="none"/>
<path d="M 18.9 8.9 L 20.6 12.9 C 23 12.2 24.5 11.9 27 10.5 C 26.9 10.4 26.9 10.3 26.8 10.2 C 24.4 9.7 20.2 8.8 19.7 8.8 C 19.6 8.9 19.3 8.9 18.9 8.9 Z " id="Shape" fill="#679FE4" stroke-width="1" stroke="none"/>
<path d="M 11.6 9.6 L 11.3 13.9 C 11.3 13.9 17 14 20.6 12.9 L 18.9 8.9 C 17.2 9.1 13.2 9.5 11.6 9.6 Z " id="Shape" fill="#7CBFEF" stroke-width="1" stroke="none"/>
</g>
</g>
</g>
</svg><!--rotationCenter:15:15-->

After

Width:  |  Height:  |  Size: 3.8 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfptmc7clhtx7"
path="res://.godot/imported/0.svg-b76264cbe10324fb670faecc659cdc73.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/bullets/diamond/frames/0.svg"
dest_files=["res://.godot/imported/0.svg-b76264cbe10324fb670faecc659cdc73.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
@@ -0,0 +1,27 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19.490625381469727" height="47.29999923706055" viewBox="2.2093749046325684 0.40000003576278687 19.490625381469727 47.29999923706055" version="1.1" xml:space="preserve">
<!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch -->
<defs/>
<g>
<title>crystal-b</title>
<desc>Created with Sketch.</desc>
<g id="crystal-b" fill-rule="evenodd">
<g id="Purple-Crystal" fill-rule="nonzero">
<g id="Group">
<path d="M 3.1 44.4 C 3.1 44.4 2.1 14.7 3.3 10.6 C 3.3 10.6 7.6 3.6 14.4 0.9 C 14.4 0.9 19.2 7.7 21.2 13.7 C 21.2 13.7 12 43.1 10.6 45.1 C 10.6 45.1 7.5 46.8 5.5 47 C 5.6 47.1 3.1 45.9 3.1 44.4 Z " id="Shape" fill="#8644B3" stroke-width="1" stroke="none"/>
<path d="M 3.4 10.7 C 3.4 10.7 5.6 15.8 9 17.7 L 14.4 1.1 C 7.7 3.7 3.4 10.7 3.4 10.7 Z " id="Shape" fill="#EA8BE5" stroke-width="1" stroke="none"/>
<path d="M 3.4 10.7 C 3.4 10.7 5.6 15.8 9 17.7 L 14.4 1.1 C 7.7 3.7 3.4 10.7 3.4 10.7 Z " id="Shape" fill="#EA8BE5" stroke-width="1" stroke="none"/>
<path d="M 21.2 13.8 C 19.3 7.8 14.5 1 14.5 1 C 14.5 1 14.4 1 14.4 1.1 L 8.9 17.7 C 8.9 17.7 14.7 16.5 21 14.6 C 21.2 14 21.2 13.8 21.2 13.8 Z " id="Shape" fill="#AD59C2" stroke-width="1" stroke="none"/>
<path d="M 3.4 10.7 C 2.2 14.8 3.2 44.5 3.2 44.5 C 3.2 45.9 5.6 47.2 5.6 47.2 L 9 17.8 L 3.4 10.7 Z " id="Shape" fill="#AD59C2" stroke-width="1" stroke="none"/>
<path d="M 8.9 17.7 C 8.9 17.7 8.8 19.3 8.6 21.7 C 8.5 22.9 8.3 24.3 8.2 25.8 C 8 27.3 7.9 28.9 7.7 30.4 C 7.5 32 7.3 33.6 7.1 35 C 6.9 36.5 6.7 37.9 6.6 39 C 6.2 41.3 6 42.9 6 42.9 C 6 42.9 6.1 41.3 6.3 38.9 C 6.4 37.7 6.6 36.3 6.7 34.8 C 6.9 33.3 7 31.7 7.2 30.2 C 7.4 28.6 7.6 27 7.8 25.6 C 8 24.1 8.2 22.7 8.3 21.6 C 8.7 19.2 8.9 17.7 8.9 17.7 Z " id="Shape" fill="#EA8BE5" stroke-width="1" stroke="none"/>
<path d="M 3.1 44.4 C 3.1 45.8 5.5 47.1 5.5 47.1 L 5.9 43.8 C 4.7 44.1 3.1 44.4 3.1 44.4 Z " id="Shape" fill="#A546BD" stroke-width="1" stroke="none"/>
<path d="M 7.2 43.6 C 7 43.6 6.5 43.7 5.9 43.8 L 5.5 47.1 C 7.4 46.9 10.6 45.2 10.6 45.2 C 10.6 45.2 8 43.5 7.2 43.6 Z " id="Shape" fill="#7C36AB" stroke-width="1" stroke="none"/>
<path d="M 5.6 47.1 C 6.5 46.9 7.4 46.6 8.2 46.3 C 9 46 9.8 45.6 10.5 45 L 10.4 45.1 C 11 43.1 11.7 41.1 12.4 39.1 C 13.1 37.1 13.7 35.1 14.4 33.2 C 15.8 29.2 17.2 25.3 18.7 21.4 C 17.5 25.4 16.2 29.4 14.8 33.4 C 14.1 35.4 13.4 37.4 12.8 39.3 C 12.1 41.3 11.4 43.3 10.7 45.2 C 9.9 45.7 9.1 46.1 8.2 46.4 C 7.3 46.8 6.5 47 5.6 47.1 Z " id="Shape" fill="#6B348F" stroke-width="1" stroke="none"/>
<path d="M 8.9 17.7 L 11.3 10.3 C 7.9 10.3 3.3 10.7 3.3 10.7 C 3.3 10.7 5.6 15.7 8.9 17.7 Z " id="Shape" fill="#E17DE3" stroke-width="1" stroke="none"/>
<path d="M 11.3 10.3 L 8.9 17.7 C 8.9 17.7 14.7 16.5 21 14.6 C 21.1 14.1 21.2 13.9 21.2 13.9 C 21.2 13.8 21.1 13.6 21.1 13.5 C 18.9 12.4 15.6 10.9 14.7 10.6 C 14.3 10.3 12.9 10.3 11.3 10.3 Z " id="Shape" fill="#9B4DAE" stroke-width="1" stroke="none"/>
<path d="M 21 14.5 C 21 14.5 20.4 14.8 19.6 15.1 C 18.7 15.4 17.6 15.8 16.4 16.2 C 15.2 16.5 14 16.8 13.1 17 C 12.2 17.2 11.6 17.2 11.6 17.2 C 11.6 17.2 11.7 17.2 12 17.1 C 12.3 17 12.6 16.9 13.1 16.8 C 14 16.5 15.1 16.2 16.3 15.8 C 17.5 15.5 18.7 15.1 19.6 14.9 C 20.4 14.6 21 14.5 21 14.5 Z " id="Shape" fill="#6B348F" stroke-width="1" stroke="none"/>
</g>
<path d="M 14.4 1.1 C 14.4 1.1 14.2 1.9 13.9 3.1 C 13.6 4.3 13.1 5.9 12.6 7.5 C 12.1 9.1 11.5 10.7 11 11.9 C 10.5 13.1 10.2 13.9 10.2 13.9 C 10.2 13.9 10.4 13.1 10.7 11.9 C 11 10.6 11.5 8.9 12 7.4 C 12.5 5.8 13.1 4.2 13.6 3 C 14 1.8 14.4 1.1 14.4 1.1 Z " id="Shape" fill="#FFBCFC" stroke-width="1" stroke="none"/>
</g>
</g>
</g>
</svg><!--rotationCenter:12:24-->

After

Width:  |  Height:  |  Size: 3.8 KiB

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c7hyatbuieaj"
path="res://.godot/imported/0.svg-ba68a30343badda4169c625106c39869.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/bullets/purple-crystal/frames/0.svg"
dest_files=["res://.godot/imported/0.svg-ba68a30343badda4169c625106c39869.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