Class PhaseSM
phase
: A high-level SM that controls a "phase", which is a sequence of SMs that may run for variable time
under various ending conditions.
Phases are used to implement 'cards' or 'spells' or 'nonspells' in danmaku games.
Phases also generally share some state due to data hoisting, events, etc. If you use the type
property to declare a card type, or you use the clear
property, then this state and all its bullets will be cleared on phase end.
Inheritance
System.Object
Danmokou.SM.StateMachine
PhaseSM
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: cs.temp.dll.dll
Syntax
public class PhaseSM : SequentialSM
Constructors
PhaseSM(Single, PhaseProperties, StateMachine[])
Declaration
public PhaseSM(float timeout, PhaseProperties props, params StateMachine[] states)
Parameters
Type |
Name |
Description |
System.Single |
timeout |
Timeout in seconds before the phase automatically ends. Set to zero for no timeout
|
Danmokou.SM.PhaseProperties |
props |
Properties describing miscellaneous features of this phase
|
Danmokou.SM.StateMachine[] |
states |
Substates, run sequentially
|
Fields
props
Declaration
public readonly PhaseProperties props
Field Value
Type |
Description |
Danmokou.SM.PhaseProperties |
|
Methods
MakeContext(PatternContext)
Declaration
public PhaseContext MakeContext(PatternContext parent)
Parameters
Returns
PrePrepareBackgroundGraphics(PhaseContext, Nullable<IBackgroundOrchestrator>)
Try to prepare background graphics separately from the standard preparation process.
This function can be called while the previous phase is still executing (eg. during post-phase cull time).
Note that this can result in the background being set twice (once here and once in PreparePhase),
but BackgroundOrchestrator will make the second set a noop.
Declaration
public void PrePrepareBackgroundGraphics(PhaseContext ctx, IBackgroundOrchestrator? bgo)
Parameters
Type |
Name |
Description |
PhaseContext |
ctx |
|
System.Nullable<IBackgroundOrchestrator> |
bgo |
|
Start(PhaseContext, SMHandoff, Nullable<IUIManager>, IReadOnlyList<Enemy>, Action<Nullable<IBackgroundOrchestrator>>)
Declaration
public async Task Start(PhaseContext ctx, SMHandoff smh, IUIManager? ui, IReadOnlyList<Enemy> subbosses, Action<IBackgroundOrchestrator?> prePrepareNextPhase = null)
Parameters
Type |
Name |
Description |
PhaseContext |
ctx |
|
Danmokou.SM.SMHandoff |
smh |
|
System.Nullable<IUIManager> |
ui |
|
IReadOnlyList<Enemy> |
subbosses |
|
System.Action<System.Nullable<IBackgroundOrchestrator>> |
prePrepareNextPhase |
|
Returns
Start(SMHandoff)
Declaration
public override Task Start(SMHandoff smh)
Parameters
Type |
Name |
Description |
Danmokou.SM.SMHandoff |
smh |
|
Returns
Overrides