TowerGame/scripts/building_components/building.gd

21 lines
306 B
GDScript3
Raw Normal View History

2025-04-21 20:49:29 +01:00
extends Node
class_name Building
@export var max_hp: int = 100
enum BuildState {
UNPLACED,
BUILDING,
READY,
DESTROYED
}
var hp: int = max_hp
var build_state: BuildState = BuildState.BUILDING:
set(state):
build_state = state
func is_functional() -> bool:
return build_state == BuildState.READY