Infinite Runner Engine v1.9
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.InfiniteRunnerEngine.ScenarioManager Class Reference

Scenario manager This class is meant to be extended, and its Scenario() method overridden to describe your own level's scenario. More...

Inheritance diagram for MoreMountains.InfiniteRunnerEngine.ScenarioManager:
MoreMountains.InfiniteRunnerEngine.AlbatrossScenario MoreMountains.InfiniteRunnerEngine.ExampleScenario MoreMountains.InfiniteRunnerEngine.VerticalScenario

Public Member Functions

virtual void StopScenario ()
 Use this method to stop the scenario from being evaluated More...
 

Public Attributes

float EvaluationFrequency =1
 The frequency at which the scenario will be evaluated, in seconds. More...
 
bool UseEventManager =true
 

Protected Member Functions

virtual void Awake ()
 On Awake, we initialize our scenario More...
 
virtual void Start ()
 On start, we create and fill the scenario More...
 
virtual void Scenario ()
 Describes the scenario More...
 
virtual void AddTimeEvent (string timeInStringNotation, Action action, string eventName="")
 Adds an event to the scenario that will be triggered at the specified time. More...
 
virtual void AddScoreEvent (float startScore, Action action, string eventName="")
 Adds the score event. More...
 
virtual void EvaluateScenario ()
 Evaluates the scenario, triggering events every time the level's running time is higher than their start time More...
 
virtual void TestMethod (string someMessage)
 A test method that just displays the string passed as an argument. Just used for demo purposes. More...
 

Protected Attributes

List< ScenarioEvent_scenario
 

Detailed Description

Scenario manager This class is meant to be extended, and its Scenario() method overridden to describe your own level's scenario.

Member Function Documentation

◆ AddScoreEvent()

virtual void MoreMountains.InfiniteRunnerEngine.ScenarioManager.AddScoreEvent ( float  startScore,
Action  action,
string  eventName = "" 
)
protectedvirtual

Adds the score event.

Parameters
startScorethe minimum score for this event to happen.
actionAction.
eventNameThe name of the MMEvent to trigger when that event is met.

◆ AddTimeEvent()

virtual void MoreMountains.InfiniteRunnerEngine.ScenarioManager.AddTimeEvent ( string  timeInStringNotation,
Action  action,
string  eventName = "" 
)
protectedvirtual

Adds an event to the scenario that will be triggered at the specified time.

Parameters
timeInStringNotationTime in hh:mm:ss:SSS string notation.
actionAction.
eventNameThe name of the MMEvent to trigger when that event is met.

◆ Awake()

virtual void MoreMountains.InfiniteRunnerEngine.ScenarioManager.Awake ( )
protectedvirtual

On Awake, we initialize our scenario

◆ EvaluateScenario()

virtual void MoreMountains.InfiniteRunnerEngine.ScenarioManager.EvaluateScenario ( )
protectedvirtual

Evaluates the scenario, triggering events every time the level's running time is higher than their start time

◆ Scenario()

virtual void MoreMountains.InfiniteRunnerEngine.ScenarioManager.Scenario ( )
protectedvirtual

◆ Start()

virtual void MoreMountains.InfiniteRunnerEngine.ScenarioManager.Start ( )
protectedvirtual

On start, we create and fill the scenario

◆ StopScenario()

virtual void MoreMountains.InfiniteRunnerEngine.ScenarioManager.StopScenario ( )
virtual

Use this method to stop the scenario from being evaluated

◆ TestMethod()

virtual void MoreMountains.InfiniteRunnerEngine.ScenarioManager.TestMethod ( string  someMessage)
protectedvirtual

A test method that just displays the string passed as an argument. Just used for demo purposes.

Parameters
someMessageSome message.

Member Data Documentation

◆ _scenario

List<ScenarioEvent> MoreMountains.InfiniteRunnerEngine.ScenarioManager._scenario
protected

◆ EvaluationFrequency

float MoreMountains.InfiniteRunnerEngine.ScenarioManager.EvaluationFrequency =1

The frequency at which the scenario will be evaluated, in seconds.

◆ UseEventManager

bool MoreMountains.InfiniteRunnerEngine.ScenarioManager.UseEventManager =true

The documentation for this class was generated from the following file: