mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
ef8fd0db9f
- 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.
11 lines
208 B
GDScript
11 lines
208 B
GDScript
extends Node2D
|
|
|
|
@export var entity: EntityBase
|
|
|
|
@onready var healthBar: ColorBar = $"%health"
|
|
|
|
func _process(_delta):
|
|
if entity:
|
|
healthBar.maxValue = entity.maxHealth
|
|
healthBar.setCurrent(entity.health)
|