Class SMReflection
All public functions in this repository can be used as LASM state machines.
Inheritance
System.Object
SMReflection
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 static class SMReflection
Methods
AssertComplex(String)
Declaration
public static ReflectableLASM AssertComplex(string p_pool)
Parameters
Type |
Name |
Description |
System.String |
p_pool |
|
Returns
AssertSimple(String)
Declaration
public static ReflectableLASM AssertSimple(string p_pool)
Parameters
Type |
Name |
Description |
System.String |
p_pool |
|
Returns
Async(String, GCXF<V2RV2>, AsyncPattern)
Asynchronous bullet pattern fire.
Declaration
public static ReflectableLASM Async(string style, GCXF<V2RV2> rv2, AsyncPattern ap)
Parameters
Type |
Name |
Description |
System.String |
style |
|
GCXF<V2RV2> |
rv2 |
|
AsyncPattern |
ap |
|
Returns
BEHControl(GCXF<Boolean>, StyleSelector, BehaviorEntity.cBEHControl)
Apply bullet controls to BEH bullet pools.
Declaration
public static ReflectableLASM BEHControl(GCXF<bool> persist, StyleSelector style, BehaviorEntity.cBEHControl control)
Parameters
Type |
Name |
Description |
GCXF<System.Boolean> |
persist |
|
StyleSelector |
style |
|
BehaviorEntity.cBEHControl |
control |
|
Returns
Boss(String)
Summon a boss, ie. a BEH with its own action handling.
The boss configuration must be loaded in ResourceManager.
Declaration
public static ReflectableLASM Boss(string bossKey)
Parameters
Type |
Name |
Description |
System.String |
bossKey |
|
Returns
BulletControl(GCXF<Boolean>, StyleSelector, BulletManager.cBulletControl)
Apply bullet controls to simple bullet pools.
Declaration
public static ReflectableLASM BulletControl(GCXF<bool> persist, StyleSelector style, BulletManager.cBulletControl control)
Parameters
Type |
Name |
Description |
GCXF<System.Boolean> |
persist |
|
StyleSelector |
style |
|
BulletManager.cBulletControl |
control |
|
Returns
CreateShot1(V2RV2, Single, Single, String)
Declaration
public static ReflectableLASM CreateShot1(V2RV2 rv2, float speed, float angle, string style)
Parameters
Type |
Name |
Description |
V2RV2 |
rv2 |
|
System.Single |
speed |
|
System.Single |
angle |
|
System.String |
style |
|
Returns
CreateShot2(Single, Single, Single, Single, String)
Declaration
public static ReflectableLASM CreateShot2(float x, float y, float speed, float angle, string style)
Parameters
Type |
Name |
Description |
System.Single |
x |
|
System.Single |
y |
|
System.Single |
speed |
|
System.Single |
angle |
|
System.String |
style |
|
Returns
Crosshair(String, GCXF<Vector2>, GCXF<Single>, GCXF<Single>, ReflectEx.Hoist<Vector2>, ExBPY)
crosshair
: Create a crosshair that follows the target for a limited amount of time
and saves the target's position in public data hoisting.
Declaration
public static ReflectableLASM Crosshair(string style, GCXF<Vector2> locator, GCXF<float> homeSec, GCXF<float> stickSec, ReflectEx.Hoist<Vector2> locSave, ExBPY indexer)
Parameters
Type |
Name |
Description |
System.String |
style |
|
GCXF<Vector2> |
locator |
|
GCXF<System.Single> |
homeSec |
|
GCXF<System.Single> |
stickSec |
|
ReflectEx.Hoist<Vector2> |
locSave |
|
ExBPY |
indexer |
|
Returns
Cull()
Kill this entity (no death effects).
Declaration
public static ReflectableLASM Cull()
Returns
DangerBot()
Declaration
public static ReflectableLASM DangerBot()
Returns
DangerLeft()
Declaration
public static ReflectableLASM DangerLeft()
Returns
DangerLeft2()
Declaration
public static ReflectableLASM DangerLeft2()
Returns
DangerRight()
Declaration
public static ReflectableLASM DangerRight()
Returns
DangerRight2()
Declaration
public static ReflectableLASM DangerRight2()
Returns
DangerTop()
Declaration
public static ReflectableLASM DangerTop()
Returns
dBossExplode(TP4, TP4)
Declaration
public static ReflectableLASM dBossExplode(TP4 powerupColor, TP4 powerdownColor)
Parameters
Type |
Name |
Description |
TP4 |
powerupColor |
|
TP4 |
powerdownColor |
|
Returns
Debug(String)
Print a message to the console.
Declaration
public static ReflectableLASM Debug(string debug)
Parameters
Type |
Name |
Description |
System.String |
debug |
|
Returns
Delay(Synchronizer, StateMachine)
Wait for a synchronization event and then run the child.
Declaration
public static ReflectableLASM Delay(Synchronizer synchr, StateMachine state)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
synchr |
|
Danmokou.SM.StateMachine |
state |
|
Returns
Dialogue(String)
Declaration
public static ReflectableLASM Dialogue(string file)
Parameters
Type |
Name |
Description |
System.String |
file |
|
Returns
DivertHP(GCXF<BehaviorEntity>)
Link this entity's HP pool to another enemy. The other enemy will serve as the source and this will simply redirect damage.
Declaration
public static ReflectableLASM DivertHP(GCXF<BehaviorEntity> target)
Parameters
Type |
Name |
Description |
GCXF<BehaviorEntity> |
target |
|
Returns
dRaiko(GCXF<Single>, GCXF<Single>)
Declaration
public static ReflectableLASM dRaiko(GCXF<float> magnitude, GCXF<float> time)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
magnitude |
|
GCXF<System.Single> |
time |
|
Returns
dZaWarudo(GCXF<Single>)
Declaration
public static ReflectableLASM dZaWarudo(GCXF<float> time)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
time |
|
Returns
Effect(String, GCXF<Vector2>)
Spawn an effect at the given location.
Declaration
public static ReflectableLASM Effect(string effect, GCXF<Vector2> loc)
Parameters
Type |
Name |
Description |
System.String |
effect |
|
GCXF<Vector2> |
loc |
|
Returns
Exec(ErasedGCXF)
Run arbitrary code as a StateMachine.
Declaration
public static ReflectableLASM Exec(ErasedGCXF code)
Parameters
Type |
Name |
Description |
ErasedGCXF |
code |
|
Returns
Exec<T>(ErasedGCXF)
Run arbitrary code as a StateMachine, SyncPattern, or AsyncPattern.
Declaration
public static T Exec<T>(ErasedGCXF code)
where T : class
Parameters
Type |
Name |
Description |
ErasedGCXF |
code |
|
Returns
Type Parameters
ExecuteVN(Func<DMKVNState, Task>, String)
Run the provided visual novel script, disabling input while it is running.
Declaration
public static ReflectableLASM ExecuteVN(Func<DMKVNState, Task> vnTask, string scriptId)
Parameters
Type |
Name |
Description |
System.Func<DMKVNState, Task> |
vnTask |
Visual novel script function.
|
System.String |
scriptId |
Description of the script used when printing debug messages.
|
Returns
FadeSprite(BPY, GCXF<Single>)
Declaration
public static ReflectableLASM FadeSprite(BPY fader, GCXF<float> time)
Parameters
Type |
Name |
Description |
BPY |
fader |
|
GCXF<System.Single> |
time |
|
Returns
Fire(StateMachine, StateMachine, StateMachine, StateMachine)
Declaration
public static ReflectableLASM Fire(StateMachine freeFire, StateMachine freeCancel, StateMachine focusFire, StateMachine focusCancel)
Parameters
Type |
Name |
Description |
Danmokou.SM.StateMachine |
freeFire |
|
Danmokou.SM.StateMachine |
freeCancel |
|
Danmokou.SM.StateMachine |
focusFire |
|
Danmokou.SM.StateMachine |
focusCancel |
|
Returns
FireSame(StateMachine, StateMachine)
Declaration
public static ReflectableLASM FireSame(StateMachine fire, StateMachine cancel)
Parameters
Type |
Name |
Description |
Danmokou.SM.StateMachine |
fire |
|
Danmokou.SM.StateMachine |
cancel |
|
Returns
IMoveWrap(ExBPY, ExTP, ExBPY, ExTP, StateMachine)
Move-wrap, but the enemy is set invincible until the wrapped SM starts.
Declaration
public static ReflectableLASM IMoveWrap(ExBPY t1, ExTP target1, ExBPY t2, ExTP target2, StateMachine wrapped)
Parameters
Type |
Name |
Description |
ExBPY |
t1 |
|
ExTP |
target1 |
|
ExBPY |
t2 |
|
ExTP |
target2 |
|
Danmokou.SM.StateMachine |
wrapped |
|
Returns
LaserControl(GCXF<Boolean>, StyleSelector, CurvedTileRenderLaser.cLaserControl)
Apply laser-specific bullet controls to lasers.
Declaration
public static ReflectableLASM LaserControl(GCXF<bool> persist, StyleSelector style, CurvedTileRenderLaser.cLaserControl control)
Parameters
Type |
Name |
Description |
GCXF<System.Boolean> |
persist |
|
StyleSelector |
style |
|
CurvedTileRenderLaser.cLaserControl |
control |
|
Returns
LifeToScore(Int32)
Convert excess health to score at the given rate.
This is done with SFX over time and will not return immediately.
Declaration
public static ReflectableLASM LifeToScore(int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
Returns
LoadBEHTextures(StyleSelector)
Load textures for the provided styles. Textures are normally loaded the first time a bullet
is instantiated, but this may cause lag spikes on some platforms, in which case loading them ahead
of time may be better.
For simple bullets, also instantiate the bullet for a few frames to trigger a shader compile.
Declaration
public static ReflectableLASM LoadBEHTextures(StyleSelector styles)
Parameters
Type |
Name |
Description |
StyleSelector |
styles |
|
Returns
LoadSBTextures(StyleSelector)
Load textures for the provided styles. Textures are normally loaded the first time a bullet
is instantiated, but this may cause lag spikes on some platforms, in which case loading them ahead
of time may be better.
For simple bullets, also instantiate the bullet for a few frames to trigger a shader compile.
Declaration
public static ReflectableLASM LoadSBTextures(StyleSelector styles)
Parameters
Type |
Name |
Description |
StyleSelector |
styles |
|
Returns
Move(GCXF<Single>, VTP)
Move the executing entity.
Declaration
public static ReflectableLASM Move(GCXF<float> time, VTP path)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
time |
|
VTP |
path |
|
Returns
MoveTarget(ExBPY, Func<TExArgCtx, TEx<Func<Single, Single>>>, ExTP)
Move the executing entity to a target position over time. This has zero error.
Declaration
public static ReflectableLASM MoveTarget(ExBPY time, Func<TExArgCtx, TEx<Func<float, float>>> ease, ExTP target)
Parameters
Type |
Name |
Description |
ExBPY |
time |
|
System.Func<TExArgCtx, TEx<System.Func<System.Single, System.Single>>> |
ease |
|
ExTP |
target |
|
Returns
MoveWhile(GCXF<Single>, Nullable<Pred>, VTP)
Move the executing entity, but cancel movement if the predicate is false.
Declaration
public static ReflectableLASM MoveWhile(GCXF<float> time, Pred? condition, VTP path)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
time |
|
System.Nullable<Pred> |
condition |
|
VTP |
path |
|
Returns
MoveWrap(ExBPY, ExTP, ExBPY, ExTP, StateMachine)
Move to a target position, run a state machine, and then move to another target position.
Declaration
public static ReflectableLASM MoveWrap(ExBPY t1, ExTP target1, ExBPY t2, ExTP target2, StateMachine wrapped)
Parameters
Type |
Name |
Description |
ExBPY |
t1 |
|
ExTP |
target1 |
|
ExBPY |
t2 |
|
ExTP |
target2 |
|
Danmokou.SM.StateMachine |
wrapped |
|
Returns
MoveWrapFixedDelay(Synchronizer, ExBPY, ExTP, ExBPY, ExTP, StateMachine)
Move to a target position, run a state machine nonblockingly, wait for a synchronization event,
and then move to another target position.
Declaration
public static ReflectableLASM MoveWrapFixedDelay(Synchronizer s, ExBPY t1, ExTP target1, ExBPY t2, ExTP target2, StateMachine wrapped)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
s |
|
ExBPY |
t1 |
|
ExTP |
target1 |
|
ExBPY |
t2 |
|
ExTP |
target2 |
|
Danmokou.SM.StateMachine |
wrapped |
|
Returns
MoveWrapFixedDelayNB(Synchronizer, ExBPY, ExTP, ExBPY, ExTP, StateMachine)
Run a state machine nonblockingly, move to a target position, wait for a synchronization event,
and then move to another target position.
Declaration
public static ReflectableLASM MoveWrapFixedDelayNB(Synchronizer s, ExBPY t1, ExTP target1, ExBPY t2, ExTP target2, StateMachine wrapped)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
s |
|
ExBPY |
t1 |
|
ExTP |
target1 |
|
ExBPY |
t2 |
|
ExTP |
target2 |
|
Danmokou.SM.StateMachine |
wrapped |
|
Returns
NoOp()
Declaration
public static ReflectableLASM NoOp()
Returns
PlayerVariant((String key, StateMachine exec)[])
Select one of several state machines depending on which player is currently in use.
Disambiguates based on the "key" property of the PlayerConfig.
Declaration
public static ReflectableLASM PlayerVariant((string key, StateMachine exec)[] options)
Parameters
Type |
Name |
Description |
System.ValueTuple<System.String, Danmokou.SM.StateMachine>[] |
options |
|
Returns
Poof()
Kill this entity (death effects included).
Declaration
public static ReflectableLASM Poof()
Returns
PoolControl<CF>(StyleSelector, CF)
Apply a controller function to a pool of entities.
Declaration
public static ReflectableLASM PoolControl<CF>(StyleSelector style, CF control)
Parameters
Type |
Name |
Description |
StyleSelector |
style |
|
CF |
control |
|
Returns
Type Parameters
Pos(GCXF<Vector2>)
Set the position of the executing BEH in world coordinates using one Vector2.
Declaration
public static ReflectableLASM Pos(GCXF<Vector2> xy)
Parameters
Type |
Name |
Description |
GCXF<Vector2> |
xy |
|
Returns
Position(GCXF<Single>, GCXF<Single>)
Set the position of the executing BEH in world coordinates, with X and Y as separate arguments.
Declaration
public static ReflectableLASM Position(GCXF<float> x, GCXF<float> y)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
x |
|
GCXF<System.Single> |
y |
|
Returns
Print<T>(GCXF<T>)
Print a value to the console.
Declaration
public static ReflectableLASM Print<T>(GCXF<T> val)
Parameters
Type |
Name |
Description |
GCXF<T> |
val |
|
Returns
Type Parameters
Raiko(GCXF<Single>, GCXF<Single>, FXY)
Declaration
public static ReflectableLASM Raiko(GCXF<float> magnitude, GCXF<float> time, FXY by_time)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
magnitude |
Magnitude multiplier. Use 1 for a small but noticeable screenshake
|
GCXF<System.Single> |
time |
Time of screenshake
|
FXY |
by_time |
Magnitude multiplier over time
|
Returns
RunDelay(Synchronizer, StateMachine)
Run the child nonblockingly and then wait for a synchronization event.
Same as >> SYNCHR ~ STATE.
Declaration
public static ReflectableLASM RunDelay(Synchronizer synchr, StateMachine state)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
synchr |
|
Danmokou.SM.StateMachine |
state |
|
Returns
Save<T>(ReflectEx.Hoist<T>, GCXF<Single>, GCXF<T>)
Save some information in public data hoisting.
Public data hoisting is two-layer: it requires a name and an index.
Declaration
public static ReflectableLASM Save<T>(ReflectEx.Hoist<T> name, GCXF<float> indexer, GCXF<T> valuer)
Parameters
Type |
Name |
Description |
ReflectEx.Hoist<T> |
name |
|
GCXF<System.Single> |
indexer |
|
GCXF<T> |
valuer |
|
Returns
Type Parameters
Scale(BPY, GCXF<Single>)
Declaration
public static ReflectableLASM Scale(BPY scaler, GCXF<float> time)
Parameters
Type |
Name |
Description |
BPY |
scaler |
|
GCXF<System.Single> |
time |
|
Returns
ScreenClear()
Autodeletes enemy bullets. Note that some types of bullets (lasers, pathers, large bullets) may be unaffected.
Declaration
public static ReflectableLASM ScreenClear()
Returns
SeijaX(Single, Single)
Rotate the camera around the screen's X-axis.
Note: this returns immediately.
Declaration
public static ReflectableLASM SeijaX(float degrees, float time)
Parameters
Type |
Name |
Description |
System.Single |
degrees |
|
System.Single |
time |
|
Returns
SeijaY(Single, Single)
Rotate the camera around the screen's Y-axis.
Note: this returns immediately.
Declaration
public static ReflectableLASM SeijaY(float degrees, float time)
Parameters
Type |
Name |
Description |
System.Single |
degrees |
|
System.Single |
time |
|
Returns
SFX(String)
Declaration
public static ReflectableLASM SFX(string sfx)
Parameters
Type |
Name |
Description |
System.String |
sfx |
|
Returns
ShiftPhase()
Declaration
public static ReflectableLASM ShiftPhase()
Returns
ShiftPhaseTo(Int32)
Change the running phase.
Declaration
public static ReflectableLASM ShiftPhaseTo(int toPhase)
Parameters
Type |
Name |
Description |
System.Int32 |
toPhase |
|
Returns
SkipTime(Single)
(For debugging use) Skip forward in time in the engine. The player will be invulnerable during this time.
Declaration
public static ReflectableLASM SkipTime(float seconds)
Parameters
Type |
Name |
Description |
System.Single |
seconds |
|
Returns
Slowdown(GCXF<Single>)
Create a global slowdown effect. Note this will only reset when the nesting context (usually a phase)
is cancelled.
Declaration
public static ReflectableLASM Slowdown(GCXF<float> ratio)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
ratio |
|
Returns
SlowdownFor(Synchronizer, GCXF<Single>)
Create a global slowdown effect for a limited amount of time.
Declaration
public static ReflectableLASM SlowdownFor(Synchronizer time, GCXF<float> ratio)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
time |
|
GCXF<System.Single> |
ratio |
|
Returns
StageAnnounce()
Declaration
public static ReflectableLASM StageAnnounce()
Returns
StageDeannounce()
Declaration
public static ReflectableLASM StageDeannounce()
Returns
Sync(String, GCXF<V2RV2>, SyncPattern)
Synchronous bullet pattern fire.
Declaration
public static ReflectableLASM Sync(string style, GCXF<V2RV2> rv2, SyncPattern sp)
Parameters
Type |
Name |
Description |
System.String |
style |
|
GCXF<V2RV2> |
rv2 |
|
SyncPattern |
sp |
|
Returns
ThenDelay(Synchronizer, StateMachine)
Run the child and then wait for a synchronization event.
Declaration
public static ReflectableLASM ThenDelay(Synchronizer synchr, StateMachine state)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
synchr |
|
Danmokou.SM.StateMachine |
state |
|
Returns
Vulnerable(GCXF<Boolean>)
Set the enemy to be vulnerable if the condition returns true, otherwise set it to be invulnerable.
Declaration
public static ReflectableLASM Vulnerable(GCXF<bool> isVulnerable)
Parameters
Type |
Name |
Description |
GCXF<System.Boolean> |
isVulnerable |
|
Returns
VulnerableAfter(Synchronizer)
Set the enemy invulnerable, wait for a synchronization event, and then set it vulnerable.
(This SM is blocking.)
Declaration
public static ReflectableLASM VulnerableAfter(Synchronizer sync)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
sync |
|
Returns
Wait(Synchronizer)
Wait for a synchronization event.
Declaration
public static ReflectableLASM Wait(Synchronizer sycnhr)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
sycnhr |
|
Returns
Wrap(GCXF<StateMachine>)
Run some code that returns a StateMachine, and then execute that StateMachine.
Declaration
public static ReflectableLASM Wrap(GCXF<StateMachine> code)
Parameters
Type |
Name |
Description |
GCXF<Danmokou.SM.StateMachine> |
code |
|
Returns
ZaWarudo(GCXF<Single>, GCXF<Vector2>, Nullable<GCXF<Single>>, Nullable<GCXF<Single>>, GCXF<Single>)
Declaration
public static ReflectableLASM ZaWarudo(GCXF<float> time, GCXF<Vector2> loc, GCXF<float>? t1r, GCXF<float>? t2r, GCXF<float> scale)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
time |
|
GCXF<Vector2> |
loc |
|
System.Nullable<GCXF<System.Single>> |
t1r |
|
System.Nullable<GCXF<System.Single>> |
t2r |
|
GCXF<System.Single> |
scale |
|
Returns