A TutorialScenario is a ScenarioModule with some added features that are useful for building tutorials or similar kinds of scenarios. A TutorialScenario comes with a builtin in finite state machine for running the scenario and displays "tutorial pages" in a GUI window alongside a picture of a friendly Kerbal instructor. You can take advantage of all these features by making your ScenarioModule a subclass of TutorialScenario.
More...
|
class | TutorialFSM |
| The TutorialFSM provides a convient interface for implementing the meat of your scenario logic through a finite state machine. The states of the state machine are "pages." More...
|
|
class | TutorialPage |
| TutorialPages are the states in the TutorialFSM finite state machine. They extend the KFSMState class, which represents a class in a more general finite state machine, to add tutorial-related features like a Callback in which you draw the GUI of the tutorial page. More...
|
|
A TutorialScenario is a ScenarioModule with some added features that are useful for building tutorials or similar kinds of scenarios. A TutorialScenario comes with a builtin in finite state machine for running the scenario and displays "tutorial pages" in a GUI window alongside a picture of a friendly Kerbal instructor. You can take advantage of all these features by making your ScenarioModule a subclass of TutorialScenario.
See HarvesteR's example code in his forum article:
http://forum.kerbalspaceprogram.com/content.php/121-Writing-Tutorials-A-Demo-%28and-some-source-code%29
TutorialScenario.TutorialScenario |
( |
| ) |
|
void TutorialScenario.ClearArrows |
( |
| ) |
|
|
protected |
TutorialArrow TutorialScenario.CreateArrow |
( |
| ) |
|
|
protected |
void TutorialScenario.DeleteArrow |
( |
TutorialArrow |
arrow | ) |
|
|
protected |
void TutorialScenario.Destroy |
( |
global::UnityEngine.Object |
obj | ) |
|
|
protected |
virtual void TutorialScenario.OnAssetSetup |
( |
| ) |
|
|
protectedvirtual |
Override this function to run some initialization code?
virtual void TutorialScenario.OnTutorialSetup |
( |
| ) |
|
|
protectedvirtual |
Override this function to run some code as the tutorial is being set up.
void TutorialScenario.SetDialogRect |
( |
Rect |
r | ) |
|
|
protected |
Sets the location of the GUI window of the tutorial.
- Parameters
-
GameObject TutorialScenario.arrowPrefab |
|
protected |
List<TutorialArrow> TutorialScenario.arrows |
|
protected |
string TutorialScenario.guiSkinName |
Controls the animated image of the kerbal instructor. This object lets you make the instructor run various animations .
int TutorialScenario.instructorPortraitSize |
string TutorialScenario.instructorPrefabName |
Set this string in OnAssetSetup to specify which instructor kerbal will appear in the tutorial window. The value "Instructor_Gene" gives Gene Kerman as the instructor. The default if you do not specify anything is Werner von Kerman.
RenderTexture TutorialScenario.instructorTexture |
int TutorialScenario.textureBorderRadius |
The finite state machine that controls the progression of the tutorial.
string TutorialScenario.tutorialArrowPrefabName |
The documentation for this class was generated from the following file: