damage handler wip
This commit is contained in:
13
scripts/resources/Entity/EntityResource.gd
Normal file
13
scripts/resources/Entity/EntityResource.gd
Normal file
@@ -0,0 +1,13 @@
|
||||
extends Resource
|
||||
|
||||
class_name EntityResource
|
||||
|
||||
@export var entity_stats: entityStats
|
||||
@export var entity_scene: PackedScene
|
||||
|
||||
|
||||
func instantiate(parent: Node3D)->Entity:
|
||||
var entity_instance = entity_scene.instantiate() as Entity
|
||||
entity_instance.init_entity(entity_stats)
|
||||
parent.add_child(entity_instance)
|
||||
return entity_instance
|
||||
9
scripts/resources/Entity/EntityStats.gd
Normal file
9
scripts/resources/Entity/EntityStats.gd
Normal file
@@ -0,0 +1,9 @@
|
||||
extends Resource
|
||||
|
||||
class_name EntityStats
|
||||
|
||||
@export var max_health: MaxHealth
|
||||
@export var health: Health
|
||||
@export var armor: Armor
|
||||
@export var shield: Shield
|
||||
@export var movementSpeed: MovementSpeed
|
||||
Reference in New Issue
Block a user