Add missing command for AICharacter
This commit is contained in:
parent
d0b7c87557
commit
b92655c56f
|
@ -18,6 +18,8 @@ extends CharacterBase
|
|||
@onready var attack_hitbox_collider = $Attackbox/Collider
|
||||
@onready var hitbox_collider = $Attackbox/Collider
|
||||
@onready var state_machine: StateChart = $StateMachine
|
||||
@onready var melee_hitbox = $Meleebox
|
||||
@onready var melee_hitbox_collider = $Meleebox/DetectionArea
|
||||
|
||||
var timer = 0
|
||||
|
||||
|
@ -70,6 +72,9 @@ func set_ai_process_mode(mode: ProcessMode):
|
|||
func set_ai_enabled(enabled: bool):
|
||||
set_ai_process_mode(Node.PROCESS_MODE_INHERIT if enabled else Node.PROCESS_MODE_DISABLED)
|
||||
|
||||
func set_melee_box_enabled(enabled: bool):
|
||||
melee_hitbox_collider.disabled = !enabled
|
||||
|
||||
func _on_ai_got_hurt(attack_power: int, attack_direction: Vector2):
|
||||
attacked_from = attack_direction
|
||||
received_damage = attack_power
|
||||
|
|
Loading…
Reference in a new issue