add health component and FollowTarget Enemy Controller and minor changes

This commit is contained in:
2026-05-20 19:31:29 +01:00
parent bceb6c6df8
commit 962bc016a3
9 changed files with 56 additions and 5 deletions
+5 -1
View File
@@ -4,6 +4,9 @@ class_name CharacterController extends Node
@export_category("Movement Setting")
@export var body: CharacterBody2D
@export var move_res:MovementResouce = MovementResouce.new()
@export_group("Flags")
## Will allow body to move an slide on it's own without parent callling
@export var handle_movement:bool = false
# @export var SPEED = 500.0
# @export var JUMP_VELOCITY = -900.0
# @export var gravity = 1900
@@ -112,7 +115,8 @@ func _physics_process(delta: float) -> void:
# jump_loaded = false
# has_released_jump = false
# body.velocity.y = JUMP_VELOCITY
# move_and_slide()
if handle_movement:
body.move_and_slide()
# func jump():
# jump_loaded = true