Skip to content

Commit

Permalink
Start the game with freshman year announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor-g committed Feb 28, 2024
1 parent 9a437ec commit 81ba6c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion project/ui/game_screen.gd
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ func show_text(story) -> void:
func show_year_advancement(new_year:Year.Name) -> void:
%YearIndicator.show_advancement(new_year)

await %ScenarioContainer.clear()
# If there are children, clear them out.
# There may not be children on the first call, for the
# announcement of "Freshman Year."
if %ScenarioContainer.get_child_count() > 0:
await %ScenarioContainer.clear()

var label := preload("res://ui/year_change_label.tscn").instantiate()
label.year = new_year
await %ScenarioContainer.show_control(label)
Expand Down
3 changes: 3 additions & 0 deletions project/ui/main_scene.gd
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func _ready():
for file_path in file_paths:
world.available_stories.append(_STARTING_STORY_PATH + file_path)

# Start by telling the player this is the start of freshman year
await _game_screen.show_year_advancement(Year.Name.FRESHMAN)

while _stories_complete < world.turns_per_year * 4:
if world.available_stories.is_empty():
# This would happen if there are no available stories to run.
Expand Down

0 comments on commit 81ba6c5

Please sign in to comment.