MicroTutorialStep
An abstract class in Root.Township, ATT.MicroTutorial.Steps.
Base asset for one step of a micro tutorial. Subclasses say which player events finish the step or run their own server logic; the server's step instance spawns the step's content and watches for completion.
- Listed in ATT, Features and other game namespaces
- Inherits or implements
HashedGeneralValue<MicroTutorialStep> - Derived types
AutoCompleteAfterDelayStep,AutoCompleteStep,DestroyStepContentStep,MicroTutorialStep,PlayerEventStep,SpawnStep
Constructors
| Member | What it is |
|---|---|
protected MicroTutorialStep() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
2 private and internal fields
Properties
| Member | What it is |
|---|---|
bool DestroyOnComplete { get; set; } | If true, the server despawns the step's dynamic and static content when the step stops. |
SetPieceData DynamicContent { get; set; } | Set piece whose saved network entities the server loads into the tutorial entity when the step starts. Can be null. |
virtual int PlayerEventSearchDepth { get; } | How many earlier steps' buffered player events still count for this step. -1 (default) means all earlier steps. |
virtual IEnumerable<Type> RequiredPlayerEventTypes { get; } | Player event types the step listens to on the event bus. Empty by default. |
GameObject StaticContent { get; set; } | Prefab instantiated locally (not networked) as the step's static content. Can be null. |
string StepName { get; set; } | Display name for the step, used in its ToString and log messages. |
Methods
| Member | What it is |
|---|---|
virtual bool IsCompletedByEvent(IPlayerEvent eventInfo) | Server: returns true if the given player event finishes the step. Base returns false. |
virtual IResult IsConfigurationValid() | Checks the step's settings. The base version always succeeds; subclasses report missing fields. |
virtual async Task RunForInstance(IServerStepInstance stepInstance) | Server: custom async logic run for a step instance, such as a delay or a spawn. Does nothing by default. |
override string ToString() | Returns the step name and hash code, for logs. |
Used in
Members of other types that take, return or hold a MicroTutorialStep:
ClientController.OnServerDespawnedTutorialStepContent, ClientController.OnServerSpawnedAdditionalStepContent, ClientController.OnServerSpawnedStep, ClientStepInstanceMap.clientMap, ClientStepInstanceMap.GetSteps, ClientStepInstanceMap.InstanceExists, ClientStepInstanceMap.TryGet, DespawnStepContentCommand.MicroTutorialStep, IMicroTutorialSettings.Steps, IStepInstance.Settings, ISyncController.ServerDespawnedTutorialStepContent, ISyncController.ServerSpawnedAdditionalStepContent, ISyncController.ServerSpawnedStep, MicroTutorialSettings.steps, MicroTutorialSettings.Steps, ServerStepInstance.ServerStepInstance, SpawnStepContentCommand.MicroTutorialStep, StepInstance.Settings, StepInstance.step, StepInstance.StepInstance, SyncController.ServerDespawnedTutorialStepContent, SyncController.ServerSpawnedAdditionalStepContent, SyncController.ServerSpawnedStep.