Class AsyncPatterns
Functions that describe actions performed over time. The full type is Func{AsyncHandoff, IEnumerator}.
Inheritance
Inherited Members
Namespace: Danmokou.Danmaku.Patterns
Assembly: cs.temp.dll.dll
Syntax
public static class AsyncPatterns
Methods
Alternate(GCXF<Single>, AsyncPattern[])
Run only one of the provided patterns, using the indexer function to determine which.
Declaration
public static AsyncPattern Alternate(GCXF<float> indexer, AsyncPattern[] aps)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | indexer | |
| AsyncPattern[] | aps |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
CDelay(GCXF<Single>, SyncPattern)
Delay a synchronous invokee by a given number of frames.
Declaration
public static AsyncPattern CDelay(GCXF<float> delay, SyncPattern next)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | delay | Frame delay |
| SyncPattern | next | Synchronous invokee to delay |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
COnce(SyncPattern)
Execute the child SyncPattern once.
Declaration
public static AsyncPattern COnce(SyncPattern target)
Parameters
| Type | Name | Description |
|---|---|---|
| SyncPattern | target | Child SyncPattern to run unchanged |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
Eruption(GCXF<Single>, GCXF<Single>, ExBPY, ExBPY, ExBPY, GenCtxProperty[])
Declaration
public static AsyncPattern Eruption(GCXF<float> wait, GCXF<float> times, ExBPY angleOffset, ExBPY speed, ExBPY gravity, GenCtxProperty[] props)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | wait | |
| GCXF<System.Single> | times | |
| ExBPY | angleOffset | |
| ExBPY | speed | |
| ExBPY | gravity | |
| GenCtxProperty[] | props |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
Exec(ErasedGCXF)
Run arbitrary code as an AsyncPattern.
Note: This is reflected via Exec(ErasedGCXF).
Declaration
public static AsyncPattern Exec(ErasedGCXF code)
Parameters
| Type | Name | Description |
|---|---|---|
| ErasedGCXF | code |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GCRepeat(GenCtxProperties<AsyncPattern>, SyncPattern[])
The generic C-level repeater function. Takes any number of functionality-modifying properties as an array.
Declaration
public static AsyncPattern GCRepeat(GenCtxProperties<AsyncPattern> props, SyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| GenCtxProperties<AsyncPattern> | props | Array of properties |
| SyncPattern[] | target | Child SyncPatterns to run |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GCRepeat2(GCXF<Single>, GCXF<Single>, GCXF<V2RV2>, GenCtxProperty[], SyncPattern[])
Like GCRepeat, but has specific handling for the WAIT, TIMES, and rpp properties.
Declaration
public static AsyncPattern GCRepeat2(GCXF<float> wait, GCXF<float> times, GCXF<V2RV2> rpp, GenCtxProperty[] props, SyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | wait | Frames to wait between invocations |
| GCXF<System.Single> | times | Number of invocations |
| GCXF<V2RV2> | rpp | Amount to increment rv2 between invocations |
| GenCtxProperty[] | props | Other properties |
| SyncPattern[] | target | Child SyncPatterns to run |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GCRepeat2d(ExBPY, ExBPY, ExBPY, GCXF<V2RV2>, GenCtxProperty[], SyncPattern[])
Like GCRepeat, but has specific handling for the WAIT, TIMES, and rpp properties, where WAIT and TIMES are mutated by the difficulty reference (wait / difficulty, times * difficulty)
Declaration
public static AsyncPattern GCRepeat2d(ExBPY difficulty, ExBPY wait, ExBPY times, GCXF<V2RV2> rpp, GenCtxProperty[] props, SyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| ExBPY | difficulty | Difficulty multiplier |
| ExBPY | wait | Frames to wait between invocations |
| ExBPY | times | Number of invocations |
| GCXF<V2RV2> | rpp | Amount to increment rv2 between invocations |
| GenCtxProperty[] | props | Other properties |
| SyncPattern[] | target | Child SyncPatterns to run |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GCRepeat2dr(ExBPY, ExBPY, ExBPY, ExBPRV2, GenCtxProperty[], SyncPattern[])
Like GCRepeat, but has specific handling for the WAIT, TIMES, and rpp properties, where all three are adjusted for difficulty.
Declaration
public static AsyncPattern GCRepeat2dr(ExBPY difficulty, ExBPY wait, ExBPY times, ExBPRV2 rpp, GenCtxProperty[] props, SyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| ExBPY | difficulty | |
| ExBPY | wait | |
| ExBPY | times | |
| ExBPRV2 | rpp | |
| GenCtxProperty[] | props | |
| SyncPattern[] | target |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GCRepeat3(GCXF<Single>, GCXF<Single>, GCXF<V2RV2>, GenCtxProperty[], SyncPattern[])
Like GCRepeat, but has specific handling for the WAIT, FOR, and rpp properties (times is set to infinity).
Declaration
public static AsyncPattern GCRepeat3(GCXF<float> wait, GCXF<float> forTime, GCXF<V2RV2> rpp, GenCtxProperty[] props, SyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | wait | Frames to wait between invocations |
| GCXF<System.Single> | forTime | Maximum length of time to run these invocations for |
| GCXF<V2RV2> | rpp | Amount to increment rv2 between invocations |
| GenCtxProperty[] | props | Other properties |
| SyncPattern[] | target | Child SyncPatterns to run |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GCRepeatFRV2(GCXF<Single>, GCXF<Single>, GCXF<V2RV2>, GenCtxProperty[], SyncPattern[])
Declaration
public static AsyncPattern GCRepeatFRV2(GCXF<float> wait, GCXF<float> times, GCXF<V2RV2> frv2, GenCtxProperty[] props, SyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | wait | |
| GCXF<System.Single> | times | |
| GCXF<V2RV2> | frv2 | |
| GenCtxProperty[] | props | |
| SyncPattern[] | target |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
gEruption(GCXF<Single>, GCXF<Single>, ExBPY, ExBPY, ExBPY)
Declaration
public static AsyncPattern gEruption(GCXF<float> wait, GCXF<float> times, ExBPY angleOffset, ExBPY speed, ExBPY gravity)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | wait | |
| GCXF<System.Single> | times | |
| ExBPY | angleOffset | |
| ExBPY | speed | |
| ExBPY | gravity |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GIRepeat(GenCtxProperties<AsyncPattern>, AsyncPattern[])
The generic I-level repeater function. Takes any number of functionality-modifying properties as an array.
Declaration
public static AsyncPattern GIRepeat(GenCtxProperties<AsyncPattern> props, AsyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| GenCtxProperties<AsyncPattern> | props | Array of properties |
| AsyncPattern[] | target | Child AsyncPatterns to run |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GIRepeat2(GCXF<Single>, GCXF<Single>, GCXF<V2RV2>, GenCtxProperty[], AsyncPattern[])
Like GIRepeat, but has specific handling for the WAIT, TIMES, and rpp properties.
Declaration
public static AsyncPattern GIRepeat2(GCXF<float> wait, GCXF<float> times, GCXF<V2RV2> rpp, GenCtxProperty[] props, AsyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | wait | Frames to wait between invocations |
| GCXF<System.Single> | times | Number of invocations |
| GCXF<V2RV2> | rpp | Amount to increment rv2 between invocations |
| GenCtxProperty[] | props | Other properties |
| AsyncPattern[] | target | Child AsyncPatterns to run |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GIRepeat2d(ExBPY, ExBPY, ExBPY, GCXF<V2RV2>, GenCtxProperty[], AsyncPattern[])
Like GIRepeat, but has specific handling for the WAIT, TIMES, and rpp properties, where WAIT and TIMES are mutated by the difficulty reference (wait / difficulty, times * difficulty)
Declaration
public static AsyncPattern GIRepeat2d(ExBPY difficulty, ExBPY wait, ExBPY times, GCXF<V2RV2> rpp, GenCtxProperty[] props, AsyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| ExBPY | difficulty | Difficulty multiplier |
| ExBPY | wait | Frames to wait between invocations |
| ExBPY | times | Number of invocations |
| GCXF<V2RV2> | rpp | Amount to increment rv2 between invocations |
| GenCtxProperty[] | props | Other properties |
| AsyncPattern[] | target | Child AsyncPatterns to run |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
GIRepeat3(GCXF<Single>, GCXF<Single>, GCXF<V2RV2>, GenCtxProperty[], AsyncPattern[])
Like GIRepeat, but has specific handling for the WAIT, FOR, and rpp properties (times is set to infinity).
Declaration
public static AsyncPattern GIRepeat3(GCXF<float> wait, GCXF<float> forTime, GCXF<V2RV2> rpp, GenCtxProperty[] props, AsyncPattern[] target)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | wait | Frames to wait between invocations |
| GCXF<System.Single> | forTime | Maximum length of time to run these invocations for |
| GCXF<V2RV2> | rpp | Amount to increment rv2 between invocations |
| GenCtxProperty[] | props | Other properties |
| AsyncPattern[] | target | Child AsyncPatterns to run |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
ICacheLoc(AsyncPattern)
Saves the current location of the executing parent so all bullets fired will fire from the saved position.
Declaration
public static AsyncPattern ICacheLoc(AsyncPattern next)
Parameters
| Type | Name | Description |
|---|---|---|
| AsyncPattern | next | Asynchronous invokee to modify |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
IColor(String, AsyncPattern)
Declaration
public static AsyncPattern IColor(string color, AsyncPattern ap)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | color | |
| AsyncPattern | ap |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
IParent(String, AsyncPattern)
Any firees will be assigned the transform parent with the given BehaviorEntity ID.
Currently, this only works for lasers.
Declaration
public static AsyncPattern IParent(string behid, AsyncPattern next)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | behid | BehaviorEntity ID |
| AsyncPattern | next | Asynchronous invokee to modify |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
ISetP(GCXF<Single>, AsyncPattern)
Declaration
public static AsyncPattern ISetP(GCXF<float> p, AsyncPattern ap)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<System.Single> | p | |
| AsyncPattern | ap |
Returns
| Type | Description |
|---|---|
| AsyncPattern |
Wrap(GCXF<AsyncPattern>)
Run some code that returns an AsyncPattern, and then execute that AsyncPattern.
Declaration
public static AsyncPattern Wrap(GCXF<AsyncPattern> code)
Parameters
| Type | Name | Description |
|---|---|---|
| GCXF<AsyncPattern> | code |
Returns
| Type | Description |
|---|---|
| AsyncPattern |