feat: add tutorial section
This commit is contained in:
@@ -41,6 +41,9 @@ const LAN_PORT: int = 7777 # Port for LAN direct connections
|
||||
const LAN_DISCOVERY_PORT: int = 7778 # Port for LAN discovery
|
||||
var local_player_name: String = "Player"
|
||||
|
||||
# Tutorial Mode Flag
|
||||
var is_tutorial_mode: bool = false
|
||||
|
||||
var _udp_peer: PacketPeerUDP
|
||||
var _broadcast_timer: Timer
|
||||
|
||||
@@ -139,6 +142,14 @@ func _update_available_areas(mode: String) -> void:
|
||||
# Room Creation / Joining
|
||||
# =============================================================================
|
||||
|
||||
func start_tutorial(mode: String = "Freemode") -> void:
|
||||
is_tutorial_mode = true
|
||||
game_mode = mode
|
||||
match_duration = 300
|
||||
GameStateManager.enable_bots = true
|
||||
GameStateManager.max_players = 2 # 1 Player + 1 Bot
|
||||
create_room_lan("Tutorial")
|
||||
|
||||
func create_room(room_name: String) -> void:
|
||||
"""Host creates a new room with the given name (Nakama)."""
|
||||
is_host = true
|
||||
|
||||
Reference in New Issue
Block a user