public class MicrogameCoordinatorWrapper : MonoBehaviourWrapper

Wrapper around the MicrogameCoordinator, which is the class that powers our game logic.


public string GetMicrogameName()

(Client/Server) Get the internal name of the current microgame

Returns: (string) The internal name of the current microgame


public float GetMicrogameLength()

(Client/Server) Get the time length of the current microgame or boss stage.

Returns: (float) The length of the current microgame or boss stage.


public string GetBoss()

(Client/Server) Get the current boss stage.

Returns: (string) The current boss name


public string GetGamemode()

(Client/Server) Gets the current gamemode.

Returns: (string) The ID of the gamemode.


public string GetArgument()

(Client/Server) Get the current microgame argument.

Returns: (string) The name of the microgame argument.


public string GetSpecialRound()

(Client/Server) Get the current special round.

Returns: (string) The name of the current special round.


public bool IsRunning()

(Client/Server) Get whether the coordinator is running (that is, is a microgame or a boss running? this might be false during a break!).

Returns: (bool) Whether the coordinator is running right now.


public bool IsBoss()

(Client/Server) Are we currently in a boss stage?

Returns: (bool) Whether we are in a boss stage.


public bool InGame()

(Client/Server) Are we in an active game?

Returns: (bool) Whether we're in an active game.


public void MarkWinner(uint netId, bool awardFullScore)

(Server) Mark a player as a winner in the current microgame.

Arguments


public void UnmarkWinner(uint netId)

(Server) Unmark the current player, removing them from the winners.

Arguments


public bool IsMarkedAWinner(uint netId)

(Client/Server) Checks whether the current player is marked as a winner. Note: This might not always be up to date on clients, but it does work.

Arguments

Returns: (bool) Whether the player is marked as a winner.


public ScenePlatformsWrapper GetPlatforms()

(Client) Get the scene platforms. (Only valid in the Nexus)

Returns: (ScenePlatforms) The platforms manager.


public TowerBarriersWrapper GetTowerBarriers()

(Client) Get the tower barriers. (Only valid in the Nexus)

Returns: (TowerBarriers) The tower barriers.


public TowerTilesWrapper GetTowerTiles()

(Client) Get the tower tiles. (Only valid in the Nexus)

Returns: (TowerTiles) The tower tiles.


public uint GetRoundIndex()

(Client/Server) Get the current round index.

Returns: (uint) The current round index.


public int GetMaxRounds()

(Client/Server) Gets the total amount of rounds in this game.

Returns: (int) The amount of rounds.


public int GetSpeed()

(Client/Server) Get the current speed.

Returns: (int) The current speed.


public int GetMaxSpeeds()

(Client/Server) Get the total amount of speedups in this game.

Returns: (int) The amount of speedups.


public int GetRoundsToSpeedup()

(Client/Server) Get the amount of rounds required for a speedup to occur.

Returns: (int) The amount of rounds to speedup.


public int GetMaxBossStages()

(Client/Server) Get the amount of boss stages in this game.

Returns: (int) The amount of boss stages.


public LuaVector3 GetNexusCenter()

(Client/Server) Gets the center position of the main Nexus playfield.

Returns: (Vector3) The position of the playfield center.


public float GetNexusWidth()

(Client/Server) Gets the width size of the main Nexus playfield.

Returns: (float) The total width.


public float GetNexusLength()

(Client/Server) Gets the length size of the main Nexus playfield.

Returns: (float) The total length.


public LuaVector3 GetRandomPointInNexus(float rangeMultiplier = 1)

(Client) Gets a random point on the main Nexus playfield.

Arguments

Returns: (Vector3) The position of a random point on the playfield.


public LuaVector3 GetRandomPointInNexusSynced(float rangeMultiplier = 1)

(Client/Server) Gets a random point on the main Nexus playfield from microgame PRNG.

This will return the same random point for everyone, given they call it the same amount of times as everyone else.

Arguments

Returns: (Vector3) The position of a random point on the playfield.


public float GetRandomFloatSynced(float min, float max)

(Client/Server) Returns a random float in range of provided values from microgame PRNG.

The value is guaranteed to be synced, so long as everyone calls it the same amount of times.

Arguments


public LuaVector3 GetRandomVectorSynced(LuaVector3 min, LuaVector3 max)

(Client/Server) Returns a random vector in range of provided vectors from microgame PRNG.

The value is guaranteed to be synced, so long as everyone calls it the same amount of times.

Arguments


public TargetIndicatorWrapper AddTargetIndicator(TransformWrapper target, IndicatorType type)

(Client) Adds an on-screen indicator for a given target.

Arguments

Returns: (TargetIndicator) The target indicator element.


public void RemoveTargetIndicator(TargetIndicatorWrapper target)

(Client) Deletes a target indicator.

Arguments


public void RemoveAllTargetIndicators()

(Client) Deletes all target indicators.


public bool HasAnyIndicators()

(Client) Checks whether there are any indicators on screen right now.

Returns: (bool) Are there any indicators on screen?


public void ShowHint(string tag, string key = "", bool animate = false)

(Client) Displays a hint.

Arguments


public void HideHint()

(Clients) Hides current hint.


public void ShowHintWithGroup(string group, string tag, int maxTimesShown = 3, string key = "", bool animate = false)

(Client) Displays a hint, on the condition that the "seen" count of it is below the provided value.

Arguments


public void HideHintWithGroup(string group, bool increment)

(Client) Hides a hint, and decides whether to incremenet the "seen" value of its group.

Arguments


public bool IsHudVisible()

(Client) Is the microgame HUD active?

Returns: (bool) Whether microgame HUD is currently active.


public void SetHudVisible(bool visible)

(Client) Sets the visibility of the microgame HUD.


public bool IsRoundCounterActive()

(Client) Is the round counter active in the HUD?

Returns: (bool) Whether the round counter is currently active in the HUD.


public void SetRoundCounterActive(bool active)

(Client) Sets whether the round counter is active in the HUD.

Arguments


public void SetRoundCounterIcon(TextureResource texture)

(Client) Sets the icon of the round counter.

Arguments


public void SetRoundText(string text)

(Client) Sets a custom text for the round.

Arguments


public void SetSpeedText(string text)

(Client) Sets a custom text for the speed.

Arguments


public void ForceStopRound()

(Server) Forcibly stops a round.


public void Abort()

(Server) Aborts the coordinator.


public void ClearPlayerScores()

(Server) Resets scores of all players back to 0.


public bool IsScoreBased()

(Client/Server) Checks whether the current gamemode is based on score (Pointmatch/Scorematch/BossRush).

Returns: (bool) Is the current gamemode score based?


public bool IsLivesBased()

(Client/Server) Checks whether the current gamemode is based on lives (Survival/LastPlayerStanding).

Returns: (bool) Is the current gamemode lives based?


public bool IsTeamBased()

(Client/Server) Checks whether the current gamemode has teams enabled.

Returns: (bool) Is the current gamemode team based?


public bool IsPointmatch()

(Client/Server) Checks whether the current gamemode is Pointmatch.

Returns: (bool) Is the current gamemode Pointmatch?


public bool IsScorematch()

(Client/Server) Checks whether the current gamemode is Scorematch.

Returns: (bool) Is the current gamemode Scorematch?


public bool IsSurvival()

(Client/Server) Checks whether the current gamemode is Survival.

Returns: (bool) Is the current gamemode Survival?


public bool IsLPS()

(Client/Server) Checks whether the current gamemode is Last Player Standing.

Returns: (bool) Is the current gamemode Last Player Standing?


public bool IsBossRush()

(Client/Server) Checks whether the current gamemode is Boss Rush.

Returns: (bool) Is the current gamemode Boss Rush?