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 |
DMK.SM.TaskPattern |
|
AssertSimple(String)
Declaration
public static TaskPattern AssertSimple(string p_pool)
Parameters
Type |
Name |
Description |
System.String |
p_pool |
|
Returns
Type |
Description |
DMK.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 |
DMK.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 |
DMK.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 |
DMK.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 |
DMK.SM.TaskPattern |
|
ControlBullet(Pred, BulletManager.StyleSelector, SBCFc)
Declaration
public static TaskPattern ControlBullet(Pred persist, BulletManager.StyleSelector style, SBCFc control)
Parameters
Type |
Name |
Description |
Pred |
persist |
|
BulletManager.StyleSelector |
style |
|
SBCFc |
control |
|
Returns
Type |
Description |
DMK.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 |
DMK.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 |
DMK.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 |
DMK.SM.TaskPattern |
|
Cull()
Kill this entity (no death effects).
Declaration
public static TaskPattern Cull()
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
DangerBot()
Declaration
public static TaskPattern DangerBot()
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
DangerLeft()
Declaration
public static TaskPattern DangerLeft()
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
DangerLeft2()
Declaration
public static TaskPattern DangerLeft2()
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
DangerRight()
Declaration
public static TaskPattern DangerRight()
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
DangerRight2()
Declaration
public static TaskPattern DangerRight2()
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
DangerTop()
Declaration
public static TaskPattern DangerTop()
Returns
Type |
Description |
DMK.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 |
DMK.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 |
DMK.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 |
DMK.SM.Synchronizer |
synchr |
|
DMK.SM.StateMachine |
state |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
Dialogue(String)
Declaration
public static TaskPattern Dialogue(string file)
Parameters
Type |
Name |
Description |
System.String |
file |
|
Returns
Type |
Description |
DMK.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 |
DMK.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 |
DMK.SM.TaskPattern |
|
dZaWarudo(GCXF<Single>)
Declaration
public static TaskPattern dZaWarudo(GCXF<float> time)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
time |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
EventListen(Events.Event0, StateMachine)
Whenever an event is triggered, run the child.
Declaration
public static TaskPattern EventListen(Events.Event0 ev, StateMachine exec)
Parameters
Type |
Name |
Description |
Events.Event0 |
ev |
|
DMK.SM.StateMachine |
exec |
|
Returns
Type |
Description |
DMK.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 |
DMK.SM.TaskPattern |
|
Fire(StateMachine, StateMachine, StateMachine, StateMachine)
Declaration
public static TaskPattern Fire(StateMachine freeFire, StateMachine freeCancel, StateMachine focusFire, StateMachine focusCancel)
Parameters
Type |
Name |
Description |
DMK.SM.StateMachine |
freeFire |
|
DMK.SM.StateMachine |
freeCancel |
|
DMK.SM.StateMachine |
focusFire |
|
DMK.SM.StateMachine |
focusCancel |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
FireSame(StateMachine, StateMachine)
Declaration
public static TaskPattern FireSame(StateMachine fire, StateMachine cancel)
Parameters
Type |
Name |
Description |
DMK.SM.StateMachine |
fire |
|
DMK.SM.StateMachine |
cancel |
|
Returns
Type |
Description |
DMK.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 |
|
DMK.SM.StateMachine |
wrapped |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
LaserControlSM(Pred, BulletManager.StyleSelector, LPred, StateMachine)
Declaration
public static TaskPattern LaserControlSM(Pred persist, BulletManager.StyleSelector style, LPred cond, StateMachine sm)
Parameters
Type |
Name |
Description |
Pred |
persist |
|
BulletManager.StyleSelector |
style |
|
LPred |
cond |
|
DMK.SM.StateMachine |
sm |
|
Returns
Type |
Description |
DMK.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 |
DMK.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 |
DMK.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 |
DMK.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 |
DMK.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 |
|
DMK.SM.StateMachine |
wrapped |
|
Returns
Type |
Description |
DMK.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 |
DMK.SM.Synchronizer |
s |
|
ExBPY |
t1 |
|
ExTP |
target1 |
|
ExBPY |
t2 |
|
ExTP |
target2 |
|
DMK.SM.StateMachine |
wrapped |
|
Returns
Type |
Description |
DMK.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 |
DMK.SM.Synchronizer |
s |
|
ExBPY |
t1 |
|
ExTP |
target1 |
|
ExBPY |
t2 |
|
ExTP |
target2 |
|
DMK.SM.StateMachine |
wrapped |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
NoOp()
Declaration
public static TaskPattern NoOp()
Returns
Type |
Description |
DMK.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 |
DMK.SM.TaskPattern |
|
Type Parameters
ParticleSMControl<T>(Pred, BulletManager.StyleSelector, Pred, StateMachine)
Add a control to bullets that makes them summon an inode to run a state machine when the predicate is satisfied.
Declaration
[Obsolete("Use the normal control function with the SM command.")]
public static TaskPattern ParticleSMControl<T>(Pred persist, BulletManager.StyleSelector style, Pred cond, StateMachine sm)
Parameters
Type |
Name |
Description |
Pred |
persist |
|
BulletManager.StyleSelector |
style |
|
Pred |
cond |
|
DMK.SM.StateMachine |
sm |
|
Returns
Type |
Description |
DMK.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, DMK.SM.StateMachine>[] |
options |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
Poof()
Kill this entity (death effects included).
Declaration
public static TaskPattern Poof()
Returns
Type |
Description |
DMK.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 |
DMK.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 |
DMK.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 |
DMK.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 |
DMK.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 |
DMK.SM.Synchronizer |
synchr |
|
DMK.SM.StateMachine |
state |
|
Returns
Type |
Description |
DMK.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 |
DMK.SM.TaskPattern |
|
Type Parameters
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 |
DMK.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 |
DMK.SM.TaskPattern |
|
SFX(String)
Declaration
public static TaskPattern SFX(string sfx)
Parameters
Type |
Name |
Description |
System.String |
sfx |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
ShiftPhase()
Declaration
public static TaskPattern ShiftPhase()
Returns
Type |
Description |
DMK.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 |
DMK.SM.TaskPattern |
|
Slowdown(GCXF<Single>)
Create a global slowdown effect.
Declaration
public static TaskPattern Slowdown(GCXF<float> ratio)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
ratio |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
SlowdownFor(GCXF<Single>, GCXF<Single>)
Create a global slowdown effect for a limited amount of time.
Declaration
public static TaskPattern SlowdownFor(GCXF<float> time, GCXF<float> ratio)
Parameters
Type |
Name |
Description |
GCXF<System.Single> |
time |
|
GCXF<System.Single> |
ratio |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
SlowdownReset()
Reset the global slowdown to 1.
Declaration
public static TaskPattern SlowdownReset()
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
StageAnnounce()
Declaration
public static TaskPattern StageAnnounce()
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
StageDeannounce()
Declaration
public static TaskPattern StageDeannounce()
Returns
Type |
Description |
DMK.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 |
DMK.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 |
DMK.SM.Synchronizer |
synchr |
|
DMK.SM.StateMachine |
state |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
Vulnerable(GCXF<Boolean>)
Declaration
public static TaskPattern Vulnerable(GCXF<bool> isVulnerable)
Parameters
Type |
Name |
Description |
GCXF<System.Boolean> |
isVulnerable |
|
Returns
Type |
Description |
DMK.SM.TaskPattern |
|
Wait(Synchronizer)
Wait for a synchronization event.
Declaration
public static TaskPattern Wait(Synchronizer sycnhr)
Parameters
Type |
Name |
Description |
DMK.SM.Synchronizer |
sycnhr |
|
Returns
Type |
Description |
DMK.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 |
DMK.SM.TaskPattern |
|