prototype vibe

This commit is contained in:
Marek Lenczewski
2026-04-16 17:20:57 +02:00
parent cf5979803e
commit f21e30eb55
72 changed files with 1330 additions and 70 deletions

View File

@@ -25,11 +25,18 @@ func _on_health_changed(entity: Node, current: float, max_val: float) -> void:
func _spawn_enemies(portal: Node, count: int) -> void:
var spawned: Array = []
var is_red: bool = portal.is_in_group("red_portal")
var portal_bonus: float = 10.0 if is_red else 1.0
var total_scale: float = PlayerData.level_scale * portal_bonus
for j in range(count):
var entity: Node = ENEMY_SCENE.instantiate()
entity.spawn_scale = total_scale
var offset := Vector3(randf_range(-2, 2), 0, randf_range(-2, 2))
portal.get_parent().add_child(entity)
if is_red:
entity.add_to_group("red_enemies")
entity.global_position = portal.global_position + offset
EnemyData.set_stat(entity, "portal", portal)
spawned.append(entity)
var player: Node = get_tree().get_first_node_in_group("player")
if player: