Class SyncPatterns
Functions that describe patterns performed instantaneously.
Inheritance
Inherited Members
Namespace: Danmokou.Danmaku.Patterns
Assembly: cs.temp.dll.dll
Syntax
public static class SyncPatterns
Methods
AddTime(GCXF<Single>, SyncPattern)
Add time to summoned bullets. They will simulate the missing time and start from the specified time.
Declaration
public static SyncPattern AddTime(GCXF<float> frames, SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
GCXF<System.Single> | frames | |
SyncPattern | sp |
Returns
Type | Description |
---|---|
SyncPattern |
Alternate(GCXF<Single>, SyncPattern[])
Run only one of the provided patterns, using the indexer function to determine which.
Declaration
public static SyncPattern Alternate(GCXF<float> indexer, SyncPattern[] sps)
Parameters
Type | Name | Description |
---|---|---|
GCXF<System.Single> | indexer | |
SyncPattern[] | sps |
Returns
Type | Description |
---|---|
SyncPattern |
Color(String, SyncPattern)
Set the color of the fire.
Declaration
public static SyncPattern Color(string color, SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
System.String | color | |
SyncPattern | sp |
Returns
Type | Description |
---|---|
SyncPattern |
ColorR(String, SyncPattern)
Set the color of the fire, merging wildcards in the reverse direction.
Declaration
public static SyncPattern ColorR(string color, SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
System.String | color | |
SyncPattern | sp |
Returns
Type | Description |
---|---|
SyncPattern |
DoubleFlipX(SyncPattern)
Run the child SyncPattern twice, once without modification and once flipping the angle over the Y-axis.
Declaration
public static SyncPattern DoubleFlipX(SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
SyncPattern | sp | Child SyncPattern to repeat |
Returns
Type | Description |
---|---|
SyncPattern |
DoubleFlipXY(SyncPattern)
Run the child SyncPattern twice, once without modification and once flipping the angle over the line Y=X.
Declaration
public static SyncPattern DoubleFlipXY(SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
SyncPattern | sp | Child SyncPattern to repeat |
Returns
Type | Description |
---|---|
SyncPattern |
DoubleFlipY(SyncPattern)
Run the child SyncPattern twice, once without modification and once flipping the angle over the X-axis.
Declaration
public static SyncPattern DoubleFlipY(SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
SyncPattern | sp | Child SyncPattern to repeat |
Returns
Type | Description |
---|---|
SyncPattern |
Exec(ErasedGCXF)
Run arbitrary code as a SyncPattern.
Note: This is reflected via Exec(ErasedGCXF).
Declaration
public static SyncPattern Exec(ErasedGCXF code)
Parameters
Type | Name | Description |
---|---|---|
ErasedGCXF | code |
Returns
Type | Description |
---|---|
SyncPattern |
GSRepeat(GenCtxProperties<SyncPattern>, SyncPattern[])
The generic S-level repeater function. Takes any number of functionality-modifying properties as an array.
Declaration
public static SyncPattern GSRepeat(GenCtxProperties<SyncPattern> props, SyncPattern[] target)
Parameters
Type | Name | Description |
---|---|---|
GenCtxProperties<SyncPattern> | props | Array of properties |
SyncPattern[] | target | Child SyncPatterns to run |
Returns
Type | Description |
---|---|
SyncPattern |
GSRepeat2(GCXF<Single>, GCXF<V2RV2>, GenCtxProperty[], SyncPattern[])
Like GSRepeat, but has specific handling for the TIMES and rpp properties.
Note that SyncPatterns are instantaneous and therefore the WAIT property is inapplicable.
Declaration
public static SyncPattern GSRepeat2(GCXF<float> times, GCXF<V2RV2> rpp, GenCtxProperty[] props, SyncPattern[] target)
Parameters
Type | Name | Description |
---|---|---|
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 |
---|---|
SyncPattern |
GSRepeat2c(GCXF<Single>, GenCtxProperty[], SyncPattern[])
Like GSRepeat, but has specific handling for the TIMES property with CIRCLE.
Note that SyncPatterns are instantaneous and therefore the WAIT property is inapplicable.
Declaration
public static SyncPattern GSRepeat2c(GCXF<float> times, GenCtxProperty[] props, SyncPattern[] target)
Parameters
Type | Name | Description |
---|---|---|
GCXF<System.Single> | times | Number of invocations |
GenCtxProperty[] | props | Other properties |
SyncPattern[] | target | Child SyncPatterns to run |
Returns
Type | Description |
---|---|
SyncPattern |
GSRepeat2dr(ExBPY, ExBPY, ExBPRV2, GenCtxProperty[], SyncPattern[])
Like GSRepeat, but has specific handling for the TIMES and rpp properties, where both are mutated by the difficulty.
Declaration
public static SyncPattern GSRepeat2dr(ExBPY difficulty, ExBPY times, ExBPRV2 rpp, GenCtxProperty[] props, SyncPattern[] target)
Parameters
Type | Name | Description |
---|---|---|
ExBPY | difficulty | |
ExBPY | times | |
ExBPRV2 | rpp | |
GenCtxProperty[] | props | |
SyncPattern[] | target |
Returns
Type | Description |
---|---|
SyncPattern |
GSRepeatFRV2(GCXF<Single>, GCXF<V2RV2>, GenCtxProperty[], SyncPattern[])
Like GSRepeat, but has specific handling for the TIMES and FRV2 properties.
Note that SyncPatterns are instantaneous and therefore the WAIT property is inapplicable.
Declaration
public static SyncPattern GSRepeatFRV2(GCXF<float> times, GCXF<V2RV2> frv2, GenCtxProperty[] props, SyncPattern[] target)
Parameters
Type | Name | Description |
---|---|---|
GCXF<System.Single> | times | Number of invocations |
GCXF<V2RV2> | frv2 | Local RV2 offset as a function of GCX state |
GenCtxProperty[] | props | Other properties |
SyncPattern[] | target | Child SyncPatterns to run |
Returns
Type | Description |
---|---|
SyncPattern |
GuideEmpty(String, ExBPY, (String, UncompiledCode<Vector2>)[], (String, UncompiledCode<Single>)[], VTP, SyncPattern[])
Set up an empty-guided fire.
Declaration
public static SyncPattern GuideEmpty(string suffix, ExBPY indexer, (string, UncompiledCode<Vector2>)[] saveV2s, (string, UncompiledCode<float>)[] saveFs, VTP emptyPath, SyncPattern[] guided)
Parameters
Type | Name | Description |
---|---|---|
System.String | suffix | The suffix to use for underlying empty pool names. Do not overlap with any other guideempty functions. First character should be a period. |
ExBPY | indexer | The indexing function applied to data hoisted on the empty bullet. |
System.ValueTuple<System.String, UncompiledCode<Vector2>>[] | saveV2s | Vector2 values to save on the empty bullet. |
System.ValueTuple<System.String, UncompiledCode<System.Single>>[] | saveFs | Float values to save on the empty bullet. |
VTP | emptyPath | The movement path of the empty bullet. |
SyncPattern[] | guided | The child fires that follow the empty bullet. They have Loc0 applied to them. |
Returns
Type | Description |
---|---|
SyncPattern |
GuideEmpty2(ExBPY, (String, UncompiledCode<Vector2>)[], VTP, SyncPattern[])
GuideEmpty with a random suffix and no saved floats.
Declaration
public static SyncPattern GuideEmpty2(ExBPY indexer, (string, UncompiledCode<Vector2>)[] saveV2s, VTP emptyPath, SyncPattern[] guided)
Parameters
Type | Name | Description |
---|---|---|
ExBPY | indexer | |
System.ValueTuple<System.String, UncompiledCode<Vector2>>[] | saveV2s | |
VTP | emptyPath | |
SyncPattern[] | guided |
Returns
Type | Description |
---|---|
SyncPattern |
Loc0(SyncPattern)
Spawn the final bullet relative to the origin instead of the firing entity.
Also set the V2RV2 to zero and remove the effects of rotational offset.
Use this command to setup empty-guided fires.
Declaration
public static SyncPattern Loc0(SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
SyncPattern | sp |
Returns
Type | Description |
---|---|
SyncPattern |
Loc0c(String, SyncPattern)
Spawn the final bullet relative to the origin instead of the firing entity.
Also set the V2RV2 to zero and remove the effects of rotational offset.
Also set the color of the fire.
Use this command to setup empty-guided fires.
Declaration
public static SyncPattern Loc0c(string color, SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
System.String | color | Color of fire |
SyncPattern | sp |
Returns
Type | Description |
---|---|
SyncPattern |
PlayerGuideEmpty(String, ExBPY, (String, UncompiledCode<Vector2>)[], (String, UncompiledCode<Single>)[], VTP, SyncPattern[])
Set up an empty-guided fire for player bullets.
Declaration
public static SyncPattern PlayerGuideEmpty(string suffix, ExBPY indexer, (string, UncompiledCode<Vector2>)[] saveV2s, (string, UncompiledCode<float>)[] saveFs, VTP emptyPath, SyncPattern[] guided)
Parameters
Type | Name | Description |
---|---|---|
System.String | suffix | |
ExBPY | indexer | |
System.ValueTuple<System.String, UncompiledCode<Vector2>>[] | saveV2s | |
System.ValueTuple<System.String, UncompiledCode<System.Single>>[] | saveFs | |
VTP | emptyPath | |
SyncPattern[] | guided |
Returns
Type | Description |
---|---|
SyncPattern |
PSSFX(String, SyncPattern)
Play a sound effect and then run the child SyncPattern.
Declaration
public static SyncPattern PSSFX(string style, SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
System.String | style | Sound effect style |
SyncPattern | sp | Child SyncPattern to run unchanged |
Returns
Type | Description |
---|---|
SyncPattern |
RandomX(ExBPY, ExBPY, SyncPattern)
Equal to gsr { start rv2.rx +=f rand from to } sp
Declaration
public static SyncPattern RandomX(ExBPY from, ExBPY to, SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
ExBPY | from | |
ExBPY | to | |
SyncPattern | sp |
Returns
Type | Description |
---|---|
SyncPattern |
RandomY(ExBPY, ExBPY, SyncPattern)
Equal to gsr { start rv2.ry +=f rand from to } sp
Declaration
public static SyncPattern RandomY(ExBPY from, ExBPY to, SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
ExBPY | from | |
ExBPY | to | |
SyncPattern | sp |
Returns
Type | Description |
---|---|
SyncPattern |
SetP(GCXF<Single>, SyncPattern)
Declaration
public static SyncPattern SetP(GCXF<float> p, SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
GCXF<System.Single> | p | |
SyncPattern | sp |
Returns
Type | Description |
---|---|
SyncPattern |
World(SyncPattern)
Spawn the final bullet relative to the origin instead of the firing entity. If the firing entity is a rotated summon, rotational offset will still apply.
Declaration
public static SyncPattern World(SyncPattern sp)
Parameters
Type | Name | Description |
---|---|---|
SyncPattern | sp |
Returns
Type | Description |
---|---|
SyncPattern |
Wrap(GCXF<SyncPattern>)
Run some code that returns a SyncPattern, and then execute that SyncPattern.
Declaration
public static SyncPattern Wrap(GCXF<SyncPattern> code)
Parameters
Type | Name | Description |
---|---|---|
GCXF<SyncPattern> | code |
Returns
Type | Description |
---|---|
SyncPattern |