Class RunController
- Namespace
- SurvivorsMaker.Run
- Assembly
- SurvivorsMaker.Run.dll
Explicit run actions with phase validation before any state changes or random draws.
public sealed class RunController : IPlaytestCommands
- Inheritance
-
RunController
- Implements
- Inherited Members
- Extension Methods
Constructors
RunController(RunSystems)
public RunController(RunSystems systems)
Parameters
systemsRunSystems
Fields
PickupRules
Optional pickup/death-reward rules for subsequently started waves.
public PickupRules PickupRules
Field Value
RunTriggerHandlers
public readonly Dictionary<string, IRunTriggerHandler> RunTriggerHandlers
Field Value
TriggerHandlers
public readonly Dictionary<string, ITriggerHandler> TriggerHandlers
Field Value
Properties
NewUnlocks
public IReadOnlyList<UnlockDef> NewUnlocks { get; }
Property Value
Profile
public ProfileState Profile { get; }
Property Value
State
public RunState State { get; }
Property Value
UsedCheats
public bool UsedCheats { get; }
Property Value
Methods
Banish(int)
public RunResult Banish(int slot)
Parameters
slotint
Returns
BanishChoice(int)
public RunResult BanishChoice(int index)
Parameters
indexint
Returns
Buy(int)
Requests the buy operation through the active run rules; invalid calls return a result without changing state.
public RunResult Buy(int slot)
Parameters
slotint
Returns
CaptureEnvelope(long, string)
public SaveEnvelope CaptureEnvelope(long generation = 0, string owner = "")
Parameters
Returns
ChooseLevelUp(int)
public RunResult ChooseLevelUp(int index)
Parameters
indexint
Returns
CompleteWave()
public RunResult CompleteWave()
Returns
ConfigureProfile(IProfileStore, RunContent)
Call before displaying available characters/weapons in the menu.
public void ConfigureProfile(IProfileStore store, RunContent content = null)
Parameters
storeIProfileStorecontentRunContent
ConfigureRunStore(IRunStore)
New adapters store run payloads independently; the old profile store remains compatible.
public void ConfigureRunStore(IRunStore store)
Parameters
storeIRunStore
Create(RunRequest)
public RunState Create(RunRequest request)
Parameters
requestRunRequest
Returns
EndWave()
During a wave: ends it as survived.
public RunResult EndWave()
Returns
GiveCurrency(int)
public RunResult GiveCurrency(int amount)
Parameters
amountint
Returns
GiveItem(string)
Between waves or in field mode during a wave: adds an item or upgrade by id.
public RunResult GiveItem(string itemId)
Parameters
itemIdstring
Returns
GiveLevels(int)
Gains levels now (pending level-ups as usual).
public RunResult GiveLevels(int levels)
Parameters
levelsint
Returns
GiveWeapon(string)
Between waves: adds a weapon (by item id) to a free slot.
public RunResult GiveWeapon(string weaponId)
Parameters
weaponIdstring
Returns
Load(RunSnapshot)
public RunResult Load(RunSnapshot snapshot)
Parameters
snapshotRunSnapshot
Returns
Load(RunSnapshot, RunRequest)
public RunResult Load(RunSnapshot snapshot, RunRequest request)
Parameters
snapshotRunSnapshotrequestRunRequest
Returns
Load(SaveEnvelope, RunRequest, SaveMigrationRegistry)
public RunResult Load(SaveEnvelope envelope, RunRequest request, SaveMigrationRegistry migrations)
Parameters
envelopeSaveEnveloperequestRunRequestmigrationsSaveMigrationRegistry
Returns
Lock(int)
public RunResult Lock(int slot)
Parameters
slotint
Returns
Merge(int)
Requests the merge operation through the active run rules; invalid calls return a result without changing state.
public RunResult Merge(int weaponIndex)
Parameters
weaponIndexint
Returns
NextWave()
public RunResult NextWave()
Returns
Recycle(int)
Requests the recycle operation through the active run rules; invalid calls return a result without changing state.
public RunResult Recycle(int weaponIndex)
Parameters
weaponIndexint
Returns
Reroll()
Requests the reroll operation through the active run rules; invalid calls return a result without changing state.
public RunResult Reroll()
Returns
Save()
public RunSnapshot Save()
Returns
SetInvulnerable(bool)
During a wave: player takes no damage while on.
public RunResult SetInvulnerable(bool on)
Parameters
Truebool
Returns
SkipToWave(int)
Between waves: the next wave started is wave (1-based).
public RunResult SkipToWave(int wave)
Parameters
waveint
Returns
SpawnEnemies(string, int)
During a wave: spawns count of an enemy id around the player now (bypasses telegraph and capacity).
public RunResult SpawnEnemies(string enemyId, int count)
Parameters
Returns
StartWave()
public RunResult StartWave()
Returns
Step(Vec2)
public RunResult Step(Vec2 input)
Parameters
inputVec2
Returns
ToggleLock(int)
Requests the toggle lock operation through the active run rules; invalid calls return a result without changing state.
public RunResult ToggleLock(int slot)
Parameters
slotint