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 TaskPattern AssertComplex(string p_pool)
Parameters
Type |
Name |
Description |
System.String |
p_pool |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
AssertSimple(String)
Declaration
public static TaskPattern AssertSimple(string p_pool)
Parameters
Type |
Name |
Description |
System.String |
p_pool |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Async(String, GCXF<V2RV2>, AsyncPattern)
Asynchronous bullet pattern fire.
Declaration
public static TaskPattern Async(string style, GCXF<V2RV2> rv2, AsyncPattern ap)
Parameters
Type |
Name |
Description |
System.String |
style |
|
GCXF<V2RV2> |
rv2 |
|
AsyncPattern |
ap |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
AsyncStageFire(GCXF<V2RV2>, AsyncPattern)
Declaration
public static TaskPattern AsyncStageFire(GCXF<V2RV2> rv2, AsyncPattern ap)
Parameters
Type |
Name |
Description |
GCXF<V2RV2> |
rv2 |
|
AsyncPattern |
ap |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
AsyncStageFireP(GCXF<Single>, GCXF<V2RV2>, AsyncPattern)
= async(_, RV2, isetp(P, AP))
Declaration
public static TaskPattern AsyncStageFireP(GCXF<float> p, GCXF<V2RV2> rv2, AsyncPattern ap)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
p |
|
GCXF<V2RV2> |
rv2 |
|
AsyncPattern |
ap |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Boss(String)
Summon a boss, ie. a BEH with its own action handling.
The boss configuration must be loaded in ResourceManager.
Declaration
public static TaskPattern Boss(string bossKey)
Parameters
Type |
Name |
Description |
System.String |
bossKey |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
CreateShot1(V2RV2, Single, Single, String)
Declaration
public static TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
CreateShot2(Single, Single, Single, Single, String)
Declaration
public static TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
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 TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
Cull()
Kill this entity (no death effects).
Declaration
public static TaskPattern Cull()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
DangerBot()
Declaration
public static TaskPattern DangerBot()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
DangerLeft()
Declaration
public static TaskPattern DangerLeft()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
DangerLeft2()
Declaration
public static TaskPattern DangerLeft2()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
DangerRight()
Declaration
public static TaskPattern DangerRight()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
DangerRight2()
Declaration
public static TaskPattern DangerRight2()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
DangerTop()
Declaration
public static TaskPattern DangerTop()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
dBossExplode(TP4, TP4)
Declaration
public static TaskPattern dBossExplode(TP4 powerupColor, TP4 powerdownColor)
Parameters
Type |
Name |
Description |
TP4 |
powerupColor |
|
TP4 |
powerdownColor |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Debug(String)
Print a message to the console.
Declaration
public static TaskPattern Debug(string debug)
Parameters
Type |
Name |
Description |
System.String |
debug |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Delay(Synchronizer, StateMachine)
Wait for a synchronization event and then run the child.
Declaration
public static TaskPattern Delay(Synchronizer synchr, StateMachine state)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
synchr |
|
Danmokou.SM.StateMachine |
state |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Dialogue(String)
Declaration
public static TaskPattern Dialogue(string file)
Parameters
Type |
Name |
Description |
System.String |
file |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
DivertHP(BEHPointer)
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 TaskPattern DivertHP(BEHPointer target)
Parameters
Type |
Name |
Description |
BEHPointer |
target |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
dRaiko(GCXF<Single>, GCXF<Single>)
Declaration
public static TaskPattern dRaiko(GCXF<float> magnitude, GCXF<float> time)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
magnitude |
|
GCXF<System.Single> |
time |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
dZaWarudo(GCXF<Single>)
Declaration
public static TaskPattern dZaWarudo(GCXF<float> time)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
time |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
ExecuteVN(Func<DMKVNState, Task>, String)
Run the provided visual novel script.
Declaration
public static TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
FadeSprite(BPY, GCXF<Single>)
Declaration
public static TaskPattern FadeSprite(BPY fader, GCXF<float> time)
Parameters
Type |
Name |
Description |
BPY |
fader |
|
GCXF<System.Single> |
time |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Fire(StateMachine, StateMachine, StateMachine, StateMachine)
Declaration
public static TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
FireSame(StateMachine, StateMachine)
Declaration
public static TaskPattern FireSame(StateMachine fire, StateMachine cancel)
Parameters
Type |
Name |
Description |
Danmokou.SM.StateMachine |
fire |
|
Danmokou.SM.StateMachine |
cancel |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
IMoveWrap(ExBPY, ExTP, ExBPY, ExTP, StateMachine)
Move-wrap, but the enemy is set invincible until the wrapped SM starts.
Declaration
public static TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
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 TaskPattern LifeToScore(int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Move(GCXF<Single>, GCXU<VTP>)
Move the executing entity.
Declaration
public static TaskPattern Move(GCXF<float> time, GCXU<VTP> path)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
time |
|
GCXU<VTP> |
path |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
MoveTarget(ExBPY, Func<tfloat, tfloat>, ExTP)
Move the executing entity to a target position over time. This has zero error.
Declaration
public static TaskPattern MoveTarget(ExBPY time, Func<tfloat, tfloat> ease, ExTP target)
Parameters
Type |
Name |
Description |
ExBPY |
time |
|
System.Func<tfloat, tfloat> |
ease |
|
ExTP |
target |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
MoveWhile(GCXF<Single>, Nullable<Pred>, GCXU<VTP>)
Move the executing entity, but cancel movement if the predicate is false.
Declaration
public static TaskPattern MoveWhile(GCXF<float> time, Pred? condition, GCXU<VTP> path)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
time |
|
System.Nullable<Pred> |
condition |
|
GCXU<VTP> |
path |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
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 TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
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 TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
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 TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
NoOp()
Declaration
public static TaskPattern NoOp()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
ParticleControl<CF>(Pred, BulletManager.StyleSelector, CF)
Apply a controller function to individual entities.
Declaration
public static TaskPattern ParticleControl<CF>(Pred persist, BulletManager.StyleSelector style, CF control)
Parameters
Type |
Name |
Description |
Pred |
persist |
|
BulletManager.StyleSelector |
style |
|
CF |
control |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Type Parameters
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 TaskPattern PlayerVariant((string key, StateMachine exec)[] options)
Parameters
Type |
Name |
Description |
System.ValueTuple<System.String, Danmokou.SM.StateMachine>[] |
options |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Poof()
Kill this entity (death effects included).
Declaration
public static TaskPattern Poof()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
PoolControl<CF>(BulletManager.StyleSelector, CF)
Apply a controller function to a pool of entities.
Declaration
public static TaskPattern PoolControl<CF>(BulletManager.StyleSelector style, CF control)
Parameters
Type |
Name |
Description |
BulletManager.StyleSelector |
style |
|
CF |
control |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Type Parameters
Pos(GCXF<Vector2>)
Set the position of the executing BEH in world coordinates using one Vector2.
Declaration
public static TaskPattern Pos(GCXF<Vector2> xy)
Parameters
Type |
Name |
Description |
GCXF<Vector2> |
xy |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
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 TaskPattern Position(GCXF<float> x, GCXF<float> y)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
x |
|
GCXF<System.Single> |
y |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Raiko(GCXF<Single>, GCXF<Single>, FXY)
Declaration
public static TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|
RunDelay(Synchronizer, StateMachine)
Run the child nonblockingly and then wait for a synchronization event.
Same as >> SYNCHR ~ STATE.
Declaration
public static TaskPattern RunDelay(Synchronizer synchr, StateMachine state)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
synchr |
|
Danmokou.SM.StateMachine |
state |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
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 TaskPattern 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 |
Description |
Danmokou.SM.TaskPattern |
|
Type Parameters
Scale(BPY, GCXF<Single>)
Declaration
public static TaskPattern Scale(BPY scaler, GCXF<float> time)
Parameters
Type |
Name |
Description |
BPY |
scaler |
|
GCXF<System.Single> |
time |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
ScreenClear()
Autodeletes enemy bullets. Note that some types of bullets (lasers, pathers, large bullets) may be unaffected.
Declaration
public static TaskPattern ScreenClear()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
SeijaX(Single, Single)
Rotate the camera around the screen's X-axis.
Note: this returns immediately.
Declaration
public static TaskPattern SeijaX(float degrees, float time)
Parameters
Type |
Name |
Description |
System.Single |
degrees |
|
System.Single |
time |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
SeijaY(Single, Single)
Rotate the camera around the screen's Y-axis.
Note: this returns immediately.
Declaration
public static TaskPattern SeijaY(float degrees, float time)
Parameters
Type |
Name |
Description |
System.Single |
degrees |
|
System.Single |
time |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
SFX(String)
Declaration
public static TaskPattern SFX(string sfx)
Parameters
Type |
Name |
Description |
System.String |
sfx |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
ShiftPhase()
Declaration
public static TaskPattern ShiftPhase()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
ShiftPhaseTo(Int32)
Change the running phase.
Declaration
public static TaskPattern ShiftPhaseTo(int toPhase)
Parameters
Type |
Name |
Description |
System.Int32 |
toPhase |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
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 TaskPattern Slowdown(GCXF<float> ratio)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
ratio |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
SlowdownFor(Synchronizer, GCXF<Single>)
Create a global slowdown effect for a limited amount of time.
Declaration
public static TaskPattern SlowdownFor(Synchronizer time, GCXF<float> ratio)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
time |
|
GCXF<System.Single> |
ratio |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
StageAnnounce()
Declaration
public static TaskPattern StageAnnounce()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
StageDeannounce()
Declaration
public static TaskPattern StageDeannounce()
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Sync(String, GCXF<V2RV2>, SyncPattern)
Synchronous bullet pattern fire.
Declaration
public static TaskPattern Sync(string style, GCXF<V2RV2> rv2, SyncPattern sp)
Parameters
Type |
Name |
Description |
System.String |
style |
|
GCXF<V2RV2> |
rv2 |
|
SyncPattern |
sp |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
ThenDelay(Synchronizer, StateMachine)
Run the child and then wait for a synchronization event.
Declaration
public static TaskPattern ThenDelay(Synchronizer synchr, StateMachine state)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
synchr |
|
Danmokou.SM.StateMachine |
state |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Vulnerable(GCXF<Boolean>)
Declaration
public static TaskPattern Vulnerable(GCXF<bool> isVulnerable)
Parameters
Type |
Name |
Description |
GCXF<System.Boolean> |
isVulnerable |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
Wait(Synchronizer)
Wait for a synchronization event.
Declaration
public static TaskPattern Wait(Synchronizer sycnhr)
Parameters
Type |
Name |
Description |
Danmokou.SM.Synchronizer |
sycnhr |
|
Returns
Type |
Description |
Danmokou.SM.TaskPattern |
|
ZaWarudo(GCXF<Single>, GCXF<Vector2>, Nullable<GCXF<Single>>, Nullable<GCXF<Single>>, GCXF<Single>)
Declaration
public static TaskPattern 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
Type |
Description |
Danmokou.SM.TaskPattern |
|