generate entities on biome

This commit is contained in:
2026-05-19 09:47:42 +02:00
parent fcab02469a
commit ee8d6458ed
16 changed files with 278 additions and 37 deletions

View File

@@ -2,6 +2,7 @@ extends CharacterBody3D
class_name AIBase
@export_group("Movement")
@export var speed: float = 4.0
var _enable_state_machine: bool = true
@export var enable_state_machine: bool:
@@ -11,11 +12,17 @@ var _enable_state_machine: bool = true
get:
return _enable_state_machine
@onready var patrol_radius_shape: CollisionShape3D = $%PatrolRadiusShape
@onready var nav_agent: NavigationAgent3D = $%NavigationAgent3D
@onready var state_machine: StateMachine = $%StateMachine
@export_group("Entities")
enum EntityType { HUMANOID, ANIMAL }
@export var entity_type: EntityType = EntityType.HUMANOID
@export var entity_name: String = ""
@export var allowed_biomes: Array[String] = []
@export_range(0.0, 100.0, 0.1) var spawn_uniqueness: float = 1.0
func _ready() -> void:
randomize()

View File

@@ -14,6 +14,7 @@ radius = 20.0
[node name="AiBase" type="CharacterBody3D" unique_id=1228675528]
script = ExtResource("1_4d1nn")
entity_name = "Humanoid"
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=214482161]
mesh = SubResource("CapsuleMesh_mh3lg")