Search Results for

    Show / Hide Table of Contents

    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
    SequentialSM
    PhaseSM
    DialoguePhaseSM
    Namespace: Danmokou.SM
    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
    Type Name Description
    PatternContext parent
    Returns
    Type Description
    PhaseContext

    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
    Type Description
    Task

    Start(SMHandoff)

    Declaration
    public override Task Start(SMHandoff smh)
    Parameters
    Type Name Description
    Danmokou.SM.SMHandoff smh
    Returns
    Type Description
    Task
    Overrides
    SequentialSM.Start(SMHandoff)
    In This Article
    Back to top Generated by DocFX