-
Notifications
You must be signed in to change notification settings - Fork 0
Boss modules
Qkrisi edited this page Jan 17, 2021
·
13 revisions
protected Action<string, bool> OnNewStage;This delegate will be called every time a non-ignored module is solved.
The passed string is the name of the solved module, the passed bool will be true if every non-ignored module is solved or there's only one unsolved module left, otherwise false.
Example:
protected override void Start()
{
base.Start();
OnNewStage += (ModuleName, ReadyToSolve) => { //Can be replaced with delegate(string ModuleName, bool ReadyToSolve)
Debug.LogFormat("New solved module: {0}", ModuleName);
}
}To update the list of ignored modules, call the GetIgnoredModules() function:
protected string[] GetIgnoredModules(string ModuleName, string[] @default = null);
protected string[] GetIgnoredModules(KMBombModule Module, string[] @default = null);These functions internally call KMBossModule.GetIgnoredModules and stores the returned values in a string[]: IgnoredModules - The returned value is a reference to said array.
Use this function, so the above delegate can skip ignored modules!
ModuleExcpetion: There is no KMBossModule component attached.
protected bool WatchSolves = true;When set to false, the OnNewStage delegate won't be triggered.