|
|
|
|
|
|
public abstract class Randomizer |
|
|
|
{ |
|
|
|
bool m_PreviouslyEnabled; |
|
|
|
// ReSharper disable once InconsistentNaming
|
|
|
|
ScenarioBase m_Scenario; |
|
|
|
// ReSharper disable once InconsistentNaming
|
|
|
|
RandomizerTagManager m_TagManager; |
|
|
|
|
|
|
|
[HideInInspector, SerializeField] internal bool collapsed; |
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the scenario containing this Randomizer
|
|
|
|
/// </summary>
|
|
|
|
public ScenarioBase scenario => m_Scenario; |
|
|
|
public ScenarioBase scenario => ScenarioBase.activeScenario; |
|
|
|
public RandomizerTagManager tagManager => m_TagManager; |
|
|
|
public RandomizerTagManager tagManager => scenario.tagManager; |
|
|
|
|
|
|
|
internal IEnumerable<Parameter> parameters |
|
|
|
{ |
|
|
|
|
|
|
/// OnUpdate is executed every frame for enabled Randomizers
|
|
|
|
/// </summary>
|
|
|
|
protected virtual void OnUpdate() { } |
|
|
|
|
|
|
|
internal void Initialize(ScenarioBase parentScenario, RandomizerTagManager parentTagManager) |
|
|
|
{ |
|
|
|
m_Scenario = parentScenario; |
|
|
|
m_TagManager = parentTagManager; |
|
|
|
} |
|
|
|
|
|
|
|
internal virtual void Create() |
|
|
|
{ |
|
|
|