feat: Add main game scene with core logic, manager initialization, UI setup, and an in-game message bar.

This commit is contained in:
Yogi Wiguna
2026-02-03 14:48:41 +08:00
parent 16a46d7e76
commit 02d13d9ff5
13 changed files with 257 additions and 279 deletions
+10 -3
View File
@@ -269,10 +269,17 @@ func spawn_powerups_around(center: Vector2i, force_powerups: bool = true):
for y in range(-radius, radius + 1):
var pos = center + Vector2i(x, y)
if enhanced_gridmap.is_position_valid(pos):
# Random chance
if rng.randf() > 0.4: continue
# Random chance to spawn ANYTHING at this spot (keep density reasonable)
if rng.randf() > 0.5: continue
var item_id: int
# 70% Chance for PowerUp (11-14)
if rng.randf() < 0.7:
item_id = rng.randi_range(11, 14)
else:
# 30% Chance for Normal Tile (7-10)
item_id = rng.randi_range(7, 10)
var item_id = rng.randi_range(11, 14) # 11-14 are the new powerups
var cell = Vector3i(pos.x, 1, pos.y)
if player.is_multiplayer_authority():