Implermented health
This commit is contained in:
parent
76e5b1927f
commit
e6391d9fdd
13 changed files with 142 additions and 109 deletions
|
|
@ -5,7 +5,7 @@ class_name EnemyAI
|
|||
const ROAM_DISTANCE: float = 10.0
|
||||
const DISTANCE_TO_PLAYER: float = 10.0
|
||||
|
||||
@export var character: CharacterBody3D
|
||||
@export var character: Enemy
|
||||
|
||||
@export_category("Sprite")
|
||||
@export var sprite:Sprite3D;
|
||||
|
|
@ -14,7 +14,6 @@ const DISTANCE_TO_PLAYER: float = 10.0
|
|||
|
||||
@export_category("Agents")
|
||||
@export var agent: NavigationAgent3D;
|
||||
|
||||
@export var animationTree: AnimationTree;
|
||||
|
||||
@export_category("Firing")
|
||||
|
|
@ -47,3 +46,5 @@ func Fire() -> void:
|
|||
self.animationTree['parameters/playback'].travel('Fire')
|
||||
var instance = MuzzleFlash.instantiate(PackedScene.GEN_EDIT_STATE_INSTANCE)
|
||||
Origin.add_child(instance)
|
||||
character.fireWeapon()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue