Skip to main content

IMicroTutorial

An interface in Root.Township, ATT.MicroTutorial.

Server: one run of a micro tutorial for one player. It moves the player into a tutorial domain, runs the steps in order and brings them back afterwards. MicroTutorial is the implementation.

Properties​

MemberWhat it is
LocationChunk Chunk { get; }Location chunk the tutorial content is in.
NetworkEntity Entity { get; }The tutorial's network entity, which step content loads into.
bool IsReplay { get; }True if the player had already completed this tutorial when the run was created.
IPlayer Player { get; }The player doing the tutorial.
string SessionId { get; }Hash identifying this run, from the server id, tutorial name and a counter. Used in analytics.
IMicroTutorialSettings Settings { get; }The tutorial's settings, including its steps.
TutorialState State { get; }Inactive, started or completed.
int StepIndex { get; }Index of the current step.
IReadOnlyList<IServerStepInstance> Steps { get; }The step instances, one per step in the settings.
Transform Transform { get; }Transform of the tutorial content.

Events​

MemberWhat it is
event Action<IPlayer, IMicroTutorial> DespawnedRaised after Despawn finishes.
event Action<IPlayer, IMicroTutorial> SpawnedRaised once the tutorial has spawned and the client has loaded.
event Action<IPlayer, IMicroTutorial> StepCompletedRaised after each step completes.
event Action<IPlayer, IMicroTutorial> TutorialCompletedRaised when the final step completes.

Methods​

MemberWhat it is
Task Despawn()Respawns the player back in the overworld and cleans up the tutorial content.
Task Spawn()Docks or drops held items, moves the player into the tutorial domain, starts the first step and waits for the client to load.

Used in​

Members of other types that take, return or hold a IMicroTutorial: