A class in Root.Township, the global namespace.
Client tool that, after login, offers players who haven't done the tutorial a prompt to play it, plus a follow-up popup if they skip.
Constructors
| Member | What it is |
|---|
PlayTutorialChecker() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private PopupManager.IPopupConfig followupPopup | The follow-up popup, kept so it can be cancelled. |
private const string HasPromptedForTutorialKey | Player preferences key set once the prompt has been shown. |
private TutorialPromptBoard popup | The tutorial prompt board to show. |
private string skipTutorialFollowupMessage | Body text of the follow-up popup. |
private string skipTutorialFollowupTitle | Title of the follow-up popup. |
Methods
| Member | What it is |
|---|
protected override async void LoggedIn() | Waits a moment after login, then shows the prompt if allowed. |
protected override void LoggedOut() | Empty. |
4 private and internal methods
| Member | What it is |
|---|
private void CancelFollowup() | Closes the follow-up popup when the player chooses to join the tutorial. |
private bool CanShowTutorialPrompt() | True when the player hasn't finished the tutorial and the prompted key exists. The key check looks inverted, so the prompt may never show. |
private void Setup(IPopupBoard board) | Hooks the prompt board's join button so the follow-up is cancelled. |
private void ShowPrompt() | Saves the prompted key, then shows the tutorial prompt and the skip follow-up popup. |