From 0737e8635339ce68b716154f530c9c65c129b5ca Mon Sep 17 00:00:00 2001 From: doombubbles Date: Sun, 14 Apr 2024 15:50:51 -0700 Subject: [PATCH] Update to using .NET 8.0 SDK --- .github/workflows/build.yml | 2 +- .../CoopExtensions/NKMultiGameInterfaceExt.cs | 2 +- BloonsTD6 Mod Helper/ILRepack.targets | 3 + BloonsTD6 Mod Helper/README.md | 26 ++ .../BTD_Mod_Helper.Api.Components.Info.md | 192 +++++----- ...elper.Api.Components.ModHelperComponent.md | 342 +++++++++--------- .../BTD_Mod_Helper.Api.Display.ModDisplay.md | 84 ++--- .../BTD_Mod_Helper.Api.Helpers.MapHelper.md | 32 +- .../BTD_Mod_Helper.Api.ModContent.md | 28 +- ..._Helper.Api.Towers.ModVanillaContent_T_.md | 24 +- Documentation/BTD_Mod_Helper.BloonsTD6Mod.md | 34 +- ...lper.Extensions.AbilityModelBehaviorExt.md | 36 +- ...r.Extensions.AddBehaviorToBloonModelExt.md | 36 +- ...lper.Extensions.AirUnitModelBehaviorExt.md | 60 +-- .../BTD_Mod_Helper.Extensions.ArrayExt.md | 36 +- ...Mod_Helper.Extensions.AttackBehaviorExt.md | 32 +- ...elper.Extensions.AttackModelBehaviorExt.md | 60 +-- ..._Mod_Helper.Extensions.BloonBehaviorExt.md | 32 +- ...Helper.Extensions.BloonModelBehaviorExt.md | 32 +- ...D_Mod_Helper.Extensions.BloonsTD6ModExt.md | 56 +-- ...per.Extensions.EmissionModelBehaviorExt.md | 36 +- ...Mod_Helper.Extensions.EntityBehaviorExt.md | 32 +- .../BTD_Mod_Helper.Extensions.GameModelExt.md | 38 +- ...BTD_Mod_Helper.Extensions.GameObjectExt.md | 96 ++--- .../BTD_Mod_Helper.Extensions.GrowModelExt.md | 34 +- ...per.Extensions.Il2CppGenericIEnumerable.md | 68 ++-- ...TD_Mod_Helper.Extensions.Il2CppGenerics.md | 92 ++--- ...Mod_Helper.Extensions.Il2CppIEnumerator.md | 62 ++-- ..._Helper.Extensions.Il2CppReferenceArray.md | 32 +- ...lper.Extensions.Il2CppReferenceArrayExt.md | 78 ++-- ...Helper.Extensions.Il2CppSystemObjectExt.md | 64 ++-- .../BTD_Mod_Helper.Extensions.ListExt.md | 44 +-- .../BTD_Mod_Helper.Extensions.LockedList.md | 92 ++--- .../BTD_Mod_Helper.Extensions.ModModelExt.md | 128 +++---- .../BTD_Mod_Helper.Extensions.ModelExt.md | 102 +++--- ...d_Helper.Extensions.PetModelBehaviorExt.md | 36 +- ...Helper.Extensions.PowerModelBehaviorExt.md | 36 +- ...D_Mod_Helper.Extensions.ProfileModelExt.md | 44 +-- ...Helper.Extensions.ProjectileBehaviorExt.md | 32 +- ...r.Extensions.ProjectileModelBehaviorExt.md | 60 +-- ...BTD_Mod_Helper.Extensions.RoundModelExt.md | 32 +- .../BTD_Mod_Helper.Extensions.Texture2DExt.md | 28 +- ..._Mod_Helper.Extensions.TowerBehaviorExt.md | 32 +- ...Helper.Extensions.TowerModelBehaviorExt.md | 60 +-- ...BTD_Mod_Helper.Extensions.TowerModelExt.md | 138 +++---- ...Mod_Helper.Extensions.WeaponBehaviorExt.md | 32 +- ...elper.Extensions.WeaponModelBehaviorExt.md | 32 +- Documentation/BTD_Mod_Helper.ModHelper.md | 28 +- README.md | 2 +- 49 files changed, 1384 insertions(+), 1355 deletions(-) create mode 100644 BloonsTD6 Mod Helper/README.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38df8a081..9afa5cbee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,7 +71,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 6.0.x # net6 can still build older as well + dotnet-version: 8.0.x - name: Build diff --git a/BloonsTD6 Mod Helper/Extensions/CoopExtensions/NKMultiGameInterfaceExt.cs b/BloonsTD6 Mod Helper/Extensions/CoopExtensions/NKMultiGameInterfaceExt.cs index f39375599..7fc9875d7 100644 --- a/BloonsTD6 Mod Helper/Extensions/CoopExtensions/NKMultiGameInterfaceExt.cs +++ b/BloonsTD6 Mod Helper/Extensions/CoopExtensions/NKMultiGameInterfaceExt.cs @@ -69,7 +69,7 @@ public static void SendMessageEx(this NKMultiGameInterface nkGI, T objectToSe public static void SendMessage(this NKMultiGameInterface nkGI, String objectToSend, byte? peerId = null, string code = "") { - var message = MessageUtils.CreateMessage(objectToSend, code); + var message = MessageUtils.CreateMessageEx(objectToSend, code); if (peerId.HasValue) nkGI.SendToPeer(peerId.Value, message); else diff --git a/BloonsTD6 Mod Helper/ILRepack.targets b/BloonsTD6 Mod Helper/ILRepack.targets index 8f4bda552..b9e986a3e 100644 --- a/BloonsTD6 Mod Helper/ILRepack.targets +++ b/BloonsTD6 Mod Helper/ILRepack.targets @@ -20,6 +20,8 @@ + + @@ -31,6 +33,7 @@ + true - -## Info(string) Constructor - -Creates a new info struct representing the name, position and size of a ModHelperComponent -The name of the ModHelperComponent's Unity GameObject - -```csharp -public Info(string name); -``` -#### Parameters - - - -`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - ## Info(string, InfoPreset) Constructor @@ -49,77 +33,81 @@ The name of the ModHelperComponent's Unity GameObject A preset to apply - + -## Info(string, float) Constructor +## Info(string, float, float, float, float, Vector2, Vector2) Constructor Creates a new info struct representing the name, position and size of a ModHelperComponent The name of the ModHelperComponent's Unity GameObject ```csharp -public Info(string name, float size); +public Info(string name, float x, float y, float width, float height, Vector2 anchor, Vector2 pivot); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + -`size` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') +`x` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + -## Info(string, float, float) Constructor +`y` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') -Creates a new info struct representing the name, position and size of a ModHelperComponent -The name of the ModHelperComponent's Unity GameObject + -```csharp -public Info(string name, float width, float height); -``` -#### Parameters +`width` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + -`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') +`height` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + -`width` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') +`anchor` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') - + -`height` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') +`pivot` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') - + -## Info(string, float, float, float) Constructor +## Info(string, float, float, float, float, Vector2) Constructor Creates a new info struct representing the name, position and size of a ModHelperComponent The name of the ModHelperComponent's Unity GameObject ```csharp -public Info(string name, float x, float y, float size); +public Info(string name, float x, float y, float width, float height, Vector2 anchor); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + `x` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + `y` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + -`size` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') +`width` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + + + +`height` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + + + +`anchor` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') @@ -153,141 +141,153 @@ public Info(string name, float x, float y, float width, float height); `height` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + -## Info(string, float, float, float, float, Vector2) Constructor +## Info(string, float, float, float, Vector2) Constructor Creates a new info struct representing the name, position and size of a ModHelperComponent The name of the ModHelperComponent's Unity GameObject ```csharp -public Info(string name, float x, float y, float width, float height, Vector2 anchor); +public Info(string name, float x, float y, float size, Vector2 anchor); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + `x` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + `y` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - - -`width` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - - + -`height` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') +`size` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + `anchor` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') - + -## Info(string, float, float, float, float, Vector2, Vector2) Constructor +## Info(string, float, float, float) Constructor Creates a new info struct representing the name, position and size of a ModHelperComponent The name of the ModHelperComponent's Unity GameObject ```csharp -public Info(string name, float x, float y, float width, float height, Vector2 anchor, Vector2 pivot); +public Info(string name, float x, float y, float size); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + `x` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + `y` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + + +`size` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + + + +## Info(string, float, float, Vector2) Constructor + +Creates a new info struct representing the name, position and size of a ModHelperComponent +The name of the ModHelperComponent's Unity GameObject + +```csharp +public Info(string name, float width, float height, Vector2 anchor); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + `width` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + `height` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + `anchor` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') - - -`pivot` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') - - + -## Info(string, float, float, float, Vector2) Constructor +## Info(string, float, float) Constructor Creates a new info struct representing the name, position and size of a ModHelperComponent The name of the ModHelperComponent's Unity GameObject ```csharp -public Info(string name, float x, float y, float size, Vector2 anchor); +public Info(string name, float width, float height); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - - -`x` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - - - -`y` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - - + -`size` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') +`width` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + -`anchor` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') +`height` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + -## Info(string, float, float, Vector2) Constructor +## Info(string, float) Constructor Creates a new info struct representing the name, position and size of a ModHelperComponent The name of the ModHelperComponent's Unity GameObject ```csharp -public Info(string name, float width, float height, Vector2 anchor); +public Info(string name, float size); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + -`width` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') +`size` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + -`height` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') +## Info(string) Constructor - +Creates a new info struct representing the name, position and size of a ModHelperComponent +The name of the ModHelperComponent's Unity GameObject -`anchor` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') +```csharp +public Info(string name); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') ### Properties diff --git a/Documentation/BTD_Mod_Helper.Api.Components.ModHelperComponent.md b/Documentation/BTD_Mod_Helper.Api.Components.ModHelperComponent.md index 212f12587..148517622 100644 --- a/Documentation/BTD_Mod_Helper.Api.Components.ModHelperComponent.md +++ b/Documentation/BTD_Mod_Helper.Api.Components.ModHelperComponent.md @@ -198,73 +198,52 @@ What should happen when the button is clicked #### Returns [ModHelperButton](BTD_Mod_Helper.Api.Components.ModHelperButton.md 'BTD_Mod_Helper.Api.Components.ModHelperButton') - + -## ModHelperComponent.AddCheckbox(Info, bool, string) Method +## ModHelperComponent.AddCheckbox(Info, bool, string, UnityAction, string, int) Method Creates a new ModHelperCheckbox ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperCheckbox AddCheckbox(BTD_Mod_Helper.Api.Components.Info info, bool defaultValue, string background); +public BTD_Mod_Helper.Api.Components.ModHelperCheckbox AddCheckbox(BTD_Mod_Helper.Api.Components.Info info, bool defaultValue, string background, UnityAction onValueChanged, string checkImage, int padding); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info - + `defaultValue` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') If it starts out checked or not - + `background` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') The background behind the check, or null for nothing -#### Returns -[ModHelperCheckbox](BTD_Mod_Helper.Api.Components.ModHelperCheckbox.md 'BTD_Mod_Helper.Api.Components.ModHelperCheckbox') -The new ModHelperCheckbox - - - -## ModHelperComponent.AddCheckbox(Info, bool, string, UnityAction) Method - -Creates a new ModHelperCheckbox - -```csharp -public BTD_Mod_Helper.Api.Components.ModHelperCheckbox AddCheckbox(BTD_Mod_Helper.Api.Components.Info info, bool defaultValue, string background, UnityAction onValueChanged); -``` -#### Parameters - - - -`info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') - -The name/position/size info - - + -`defaultValue` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') +`onValueChanged` [UnityEngine.Events.UnityAction](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Events.UnityAction 'UnityEngine.Events.UnityAction') -If it starts out checked or not +Action to perform when it is checked/unchecked, or null - + -`background` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') +`checkImage` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') -The background behind the check, or null for nothing +The checkmark itself, or null for the default checkmark - + -`onValueChanged` [UnityEngine.Events.UnityAction](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Events.UnityAction 'UnityEngine.Events.UnityAction') +`padding` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') -Action to perform when it is checked/unchecked, or null +How much space around the outside of the check there is #### Returns [ModHelperCheckbox](BTD_Mod_Helper.Api.Components.ModHelperCheckbox.md 'BTD_Mod_Helper.Api.Components.ModHelperCheckbox') @@ -315,92 +294,125 @@ The checkmark itself, or null for the default checkmark [ModHelperCheckbox](BTD_Mod_Helper.Api.Components.ModHelperCheckbox.md 'BTD_Mod_Helper.Api.Components.ModHelperCheckbox') The new ModHelperCheckbox - + -## ModHelperComponent.AddCheckbox(Info, bool, string, UnityAction, string, int) Method +## ModHelperComponent.AddCheckbox(Info, bool, string, UnityAction) Method Creates a new ModHelperCheckbox ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperCheckbox AddCheckbox(BTD_Mod_Helper.Api.Components.Info info, bool defaultValue, string background, UnityAction onValueChanged, string checkImage, int padding); +public BTD_Mod_Helper.Api.Components.ModHelperCheckbox AddCheckbox(BTD_Mod_Helper.Api.Components.Info info, bool defaultValue, string background, UnityAction onValueChanged); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info - + `defaultValue` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') If it starts out checked or not - + `background` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') The background behind the check, or null for nothing - + `onValueChanged` [UnityEngine.Events.UnityAction](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Events.UnityAction 'UnityEngine.Events.UnityAction') Action to perform when it is checked/unchecked, or null - +#### Returns +[ModHelperCheckbox](BTD_Mod_Helper.Api.Components.ModHelperCheckbox.md 'BTD_Mod_Helper.Api.Components.ModHelperCheckbox') +The new ModHelperCheckbox -`checkImage` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + -The checkmark itself, or null for the default checkmark +## ModHelperComponent.AddCheckbox(Info, bool, string) Method - +Creates a new ModHelperCheckbox -`padding` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') +```csharp +public BTD_Mod_Helper.Api.Components.ModHelperCheckbox AddCheckbox(BTD_Mod_Helper.Api.Components.Info info, bool defaultValue, string background); +``` +#### Parameters -How much space around the outside of the check there is + + +`info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') + +The name/position/size info + + + +`defaultValue` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +If it starts out checked or not + + + +`background` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +The background behind the check, or null for nothing #### Returns [ModHelperCheckbox](BTD_Mod_Helper.Api.Components.ModHelperCheckbox.md 'BTD_Mod_Helper.Api.Components.ModHelperCheckbox') The new ModHelperCheckbox - + -## ModHelperComponent.AddDropdown(Info, List, float, UnityAction) Method +## ModHelperComponent.AddDropdown(Info, List, float, UnityAction, string, float) Method Creates a new ModHelperDropdown ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperDropdown AddDropdown(BTD_Mod_Helper.Api.Components.Info info, List options, float windowHeight, UnityAction onValueChanged); +public BTD_Mod_Helper.Api.Components.ModHelperDropdown AddDropdown(BTD_Mod_Helper.Api.Components.Info info, List options, float windowHeight, UnityAction onValueChanged, string background, float labelFontSize); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info. NOTE: width/height must be set to actual values - + `options` [Il2CppSystem.Collections.Generic.List](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.List 'Il2CppSystem.Collections.Generic.List') The list of options - + `windowHeight` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') Height of the created dropdown window - + `onValueChanged` [UnityEngine.Events.UnityAction](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Events.UnityAction 'UnityEngine.Events.UnityAction') Action that should happen when an option of the given index is selected + + +`background` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +The background image + + + +`labelFontSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + +Text size of label + #### Returns [ModHelperDropdown](BTD_Mod_Helper.Api.Components.ModHelperDropdown.md 'BTD_Mod_Helper.Api.Components.ModHelperDropdown') The created ModHelperDropdown @@ -450,53 +462,41 @@ The background image [ModHelperDropdown](BTD_Mod_Helper.Api.Components.ModHelperDropdown.md 'BTD_Mod_Helper.Api.Components.ModHelperDropdown') The created ModHelperDropdown - + -## ModHelperComponent.AddDropdown(Info, List, float, UnityAction, string, float) Method +## ModHelperComponent.AddDropdown(Info, List, float, UnityAction) Method Creates a new ModHelperDropdown ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperDropdown AddDropdown(BTD_Mod_Helper.Api.Components.Info info, List options, float windowHeight, UnityAction onValueChanged, string background, float labelFontSize); +public BTD_Mod_Helper.Api.Components.ModHelperDropdown AddDropdown(BTD_Mod_Helper.Api.Components.Info info, List options, float windowHeight, UnityAction onValueChanged); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info. NOTE: width/height must be set to actual values - + `options` [Il2CppSystem.Collections.Generic.List](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.List 'Il2CppSystem.Collections.Generic.List') The list of options - + `windowHeight` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') Height of the created dropdown window - + `onValueChanged` [UnityEngine.Events.UnityAction](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Events.UnityAction 'UnityEngine.Events.UnityAction') Action that should happen when an option of the given index is selected - - -`background` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - -The background image - - - -`labelFontSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - -Text size of label - #### Returns [ModHelperDropdown](BTD_Mod_Helper.Api.Components.ModHelperDropdown.md 'BTD_Mod_Helper.Api.Components.ModHelperDropdown') The created ModHelperDropdown @@ -568,109 +568,145 @@ public LayoutElement AddLayoutElement(); #### Returns [UnityEngine.UI.LayoutElement](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.UI.LayoutElement 'UnityEngine.UI.LayoutElement') - + -## ModHelperComponent.AddSlider(Info, float, float, float, float, Vector2) Method +## ModHelperComponent.AddSlider(Info, float, float, float, float, Vector2, UnityAction, float, string, float) Method Creates a new ModHelperSlider ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperSlider AddSlider(BTD_Mod_Helper.Api.Components.Info info, float defaultValue, float minValue, float maxValue, float stepSize, Vector2 handleSize); +public BTD_Mod_Helper.Api.Components.ModHelperSlider AddSlider(BTD_Mod_Helper.Api.Components.Info info, float defaultValue, float minValue, float maxValue, float stepSize, Vector2 handleSize, UnityAction onValueChanged, float fontSize, string labelSuffix, float startingValue); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info. NOTE: height must be a set value - + `defaultValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The default slider amount - + `minValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The minimum value of the slider - + `maxValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The maximum value of the slider - + `stepSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') What value the slider should increase by per tick - + `handleSize` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') The height and width of the pip + + +`onValueChanged` [UnityEngine.Events.UnityAction](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Events.UnityAction 'UnityEngine.Events.UnityAction') + +Action should happen when the slider changes value, or null + + + +`fontSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + +The size of the label text + + + +`labelSuffix` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +String to add to the end of the label, e.g. "%" + + + +`startingValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + +If not null, the value that this should start as instead of the default + #### Returns [ModHelperSlider](BTD_Mod_Helper.Api.Components.ModHelperSlider.md 'BTD_Mod_Helper.Api.Components.ModHelperSlider') - + -## ModHelperComponent.AddSlider(Info, float, float, float, float, Vector2, UnityAction) Method +## ModHelperComponent.AddSlider(Info, float, float, float, float, Vector2, UnityAction, float, string) Method Creates a new ModHelperSlider ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperSlider AddSlider(BTD_Mod_Helper.Api.Components.Info info, float defaultValue, float minValue, float maxValue, float stepSize, Vector2 handleSize, UnityAction onValueChanged); +public BTD_Mod_Helper.Api.Components.ModHelperSlider AddSlider(BTD_Mod_Helper.Api.Components.Info info, float defaultValue, float minValue, float maxValue, float stepSize, Vector2 handleSize, UnityAction onValueChanged, float fontSize, string labelSuffix); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info. NOTE: height must be a set value - + `defaultValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The default slider amount - + `minValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The minimum value of the slider - + `maxValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The maximum value of the slider - + `stepSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') What value the slider should increase by per tick - + `handleSize` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') The height and width of the pip - + `onValueChanged` [UnityEngine.Events.UnityAction](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Events.UnityAction 'UnityEngine.Events.UnityAction') Action should happen when the slider changes value, or null + + +`fontSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + +The size of the label text + + + +`labelSuffix` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +String to add to the end of the label, e.g. "%" + #### Returns [ModHelperSlider](BTD_Mod_Helper.Api.Components.ModHelperSlider.md 'BTD_Mod_Helper.Api.Components.ModHelperSlider') @@ -736,171 +772,147 @@ The size of the label text #### Returns [ModHelperSlider](BTD_Mod_Helper.Api.Components.ModHelperSlider.md 'BTD_Mod_Helper.Api.Components.ModHelperSlider') - + -## ModHelperComponent.AddSlider(Info, float, float, float, float, Vector2, UnityAction, float, string) Method +## ModHelperComponent.AddSlider(Info, float, float, float, float, Vector2, UnityAction) Method Creates a new ModHelperSlider ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperSlider AddSlider(BTD_Mod_Helper.Api.Components.Info info, float defaultValue, float minValue, float maxValue, float stepSize, Vector2 handleSize, UnityAction onValueChanged, float fontSize, string labelSuffix); +public BTD_Mod_Helper.Api.Components.ModHelperSlider AddSlider(BTD_Mod_Helper.Api.Components.Info info, float defaultValue, float minValue, float maxValue, float stepSize, Vector2 handleSize, UnityAction onValueChanged); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info. NOTE: height must be a set value - + `defaultValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The default slider amount - + `minValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The minimum value of the slider - + `maxValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The maximum value of the slider - + `stepSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') What value the slider should increase by per tick - + `handleSize` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') The height and width of the pip - + `onValueChanged` [UnityEngine.Events.UnityAction](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Events.UnityAction 'UnityEngine.Events.UnityAction') Action should happen when the slider changes value, or null - - -`fontSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - -The size of the label text - - - -`labelSuffix` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - -String to add to the end of the label, e.g. "%" - #### Returns [ModHelperSlider](BTD_Mod_Helper.Api.Components.ModHelperSlider.md 'BTD_Mod_Helper.Api.Components.ModHelperSlider') - + -## ModHelperComponent.AddSlider(Info, float, float, float, float, Vector2, UnityAction, float, string, float) Method +## ModHelperComponent.AddSlider(Info, float, float, float, float, Vector2) Method Creates a new ModHelperSlider ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperSlider AddSlider(BTD_Mod_Helper.Api.Components.Info info, float defaultValue, float minValue, float maxValue, float stepSize, Vector2 handleSize, UnityAction onValueChanged, float fontSize, string labelSuffix, float startingValue); +public BTD_Mod_Helper.Api.Components.ModHelperSlider AddSlider(BTD_Mod_Helper.Api.Components.Info info, float defaultValue, float minValue, float maxValue, float stepSize, Vector2 handleSize); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info. NOTE: height must be a set value - + `defaultValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The default slider amount - + `minValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The minimum value of the slider - + `maxValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') The maximum value of the slider - + `stepSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') What value the slider should increase by per tick - + `handleSize` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') The height and width of the pip - - -`onValueChanged` [UnityEngine.Events.UnityAction](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Events.UnityAction 'UnityEngine.Events.UnityAction') - -Action should happen when the slider changes value, or null - - - -`fontSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - -The size of the label text - - - -`labelSuffix` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - -String to add to the end of the label, e.g. "%" - - - -`startingValue` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - -If not null, the value that this should start as instead of the default - #### Returns [ModHelperSlider](BTD_Mod_Helper.Api.Components.ModHelperSlider.md 'BTD_Mod_Helper.Api.Components.ModHelperSlider') - + -## ModHelperComponent.AddText(Info, string) Method +## ModHelperComponent.AddText(Info, string, float, TextAlignmentOptions) Method Creates a new ModHelperText ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperText AddText(BTD_Mod_Helper.Api.Components.Info info, string text); +public BTD_Mod_Helper.Api.Components.ModHelperText AddText(BTD_Mod_Helper.Api.Components.Info info, string text, float fontSize, TextAlignmentOptions align); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info - + `text` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') The text to display + + +`fontSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + +Size of font + + + +`align` [Il2CppTMPro.TextAlignmentOptions](https://docs.microsoft.com/en-us/dotnet/api/Il2CppTMPro.TextAlignmentOptions 'Il2CppTMPro.TextAlignmentOptions') + +Alignment of text + #### Returns [ModHelperText](BTD_Mod_Helper.Api.Components.ModHelperText.md 'BTD_Mod_Helper.Api.Components.ModHelperText') The created ModHelperText @@ -938,41 +950,29 @@ Size of font [ModHelperText](BTD_Mod_Helper.Api.Components.ModHelperText.md 'BTD_Mod_Helper.Api.Components.ModHelperText') The created ModHelperText - + -## ModHelperComponent.AddText(Info, string, float, TextAlignmentOptions) Method +## ModHelperComponent.AddText(Info, string) Method Creates a new ModHelperText ```csharp -public BTD_Mod_Helper.Api.Components.ModHelperText AddText(BTD_Mod_Helper.Api.Components.Info info, string text, float fontSize, TextAlignmentOptions align); +public BTD_Mod_Helper.Api.Components.ModHelperText AddText(BTD_Mod_Helper.Api.Components.Info info, string text); ``` #### Parameters - + `info` [Info](BTD_Mod_Helper.Api.Components.Info.md 'BTD_Mod_Helper.Api.Components.Info') The name/position/size info - + `text` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') The text to display - - -`fontSize` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - -Size of font - - - -`align` [Il2CppTMPro.TextAlignmentOptions](https://docs.microsoft.com/en-us/dotnet/api/Il2CppTMPro.TextAlignmentOptions 'Il2CppTMPro.TextAlignmentOptions') - -Alignment of text - #### Returns [ModHelperText](BTD_Mod_Helper.Api.Components.ModHelperText.md 'BTD_Mod_Helper.Api.Components.ModHelperText') The created ModHelperText diff --git a/Documentation/BTD_Mod_Helper.Api.Display.ModDisplay.md b/Documentation/BTD_Mod_Helper.Api.Display.ModDisplay.md index 23bc793dc..764e00700 100644 --- a/Documentation/BTD_Mod_Helper.Api.Display.ModDisplay.md +++ b/Documentation/BTD_Mod_Helper.Api.Display.ModDisplay.md @@ -364,29 +364,6 @@ The UnityDisplayNode The name of the texture, without .png - - -## ModDisplay.SetMeshOutlineColor(UnityDisplayNode, Color) Method - -Sets the outline color for the first mesh renderer in the given node - -```csharp -protected void SetMeshOutlineColor(UnityDisplayNode node, Color color); -``` -#### Parameters - - - -`node` [Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode') - -The UnityDisplayNode - - - -`color` [UnityEngine.Color](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Color 'UnityEngine.Color') - -The color for it to be outlined (when not highlighted) - ## ModDisplay.SetMeshOutlineColor(UnityDisplayNode, Color, int) Method @@ -416,28 +393,28 @@ The color for it to be outlined (when not highlighted) What index of mesh renderer to use - + -## ModDisplay.SetMeshTexture(UnityDisplayNode, string) Method +## ModDisplay.SetMeshOutlineColor(UnityDisplayNode, Color) Method -Sets the mesh texture to that of a named png +Sets the outline color for the first mesh renderer in the given node ```csharp -protected void SetMeshTexture(UnityDisplayNode node, string textureName); +protected void SetMeshOutlineColor(UnityDisplayNode node, Color color); ``` #### Parameters - + `node` [Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode') The UnityDisplayNode - + -`textureName` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') +`color` [UnityEngine.Color](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Color 'UnityEngine.Color') -The name of the texture, without .png +The color for it to be outlined (when not highlighted) @@ -468,28 +445,28 @@ The name of the texture, without .png The index to set at - + -## ModDisplay.UseNode(string, Action) Method +## ModDisplay.SetMeshTexture(UnityDisplayNode, string) Method -Gets a UnityDisplayNode for a different guid +Sets the mesh texture to that of a named png ```csharp -protected void UseNode(string guid, System.Action action); +protected void SetMeshTexture(UnityDisplayNode node, string textureName); ``` #### Parameters - + -`guid` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') +`node` [Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode') -The asset reference guid to get the node from +The UnityDisplayNode - + -`action` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') +`textureName` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') -What to do with the node +The name of the texture, without .png @@ -516,4 +493,27 @@ What to do with the node -`displayCategory` [Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory 'Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory') \ No newline at end of file +`displayCategory` [Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory 'Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory') + + + +## ModDisplay.UseNode(string, Action) Method + +Gets a UnityDisplayNode for a different guid + +```csharp +protected void UseNode(string guid, System.Action action); +``` +#### Parameters + + + +`guid` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +The asset reference guid to get the node from + + + +`action` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') + +What to do with the node \ No newline at end of file diff --git a/Documentation/BTD_Mod_Helper.Api.Helpers.MapHelper.md b/Documentation/BTD_Mod_Helper.Api.Helpers.MapHelper.md index 7668f15bb..b859f3692 100644 --- a/Documentation/BTD_Mod_Helper.Api.Helpers.MapHelper.md +++ b/Documentation/BTD_Mod_Helper.Api.Helpers.MapHelper.md @@ -56,51 +56,51 @@ public static PathModel CreatePathModel(string pathName, System.Collections.Gene #### Returns [Il2CppAssets.Scripts.Models.Map.PathModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PathModel 'Il2CppAssets.Scripts.Models.Map.PathModel') - + -## MapHelper.CreatePointInfo(float, float) Method +## MapHelper.CreatePointInfo(float, float, float) Method -Create a [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') out of an X and Y coord. +Create a [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') out of X, Y, Z coords. ```csharp -public static PointInfo CreatePointInfo(float x, float y); +public static PointInfo CreatePointInfo(float x, float y, float z); ``` #### Parameters - + `x` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + `y` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + + +`z` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + #### Returns [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') - + -## MapHelper.CreatePointInfo(float, float, float) Method +## MapHelper.CreatePointInfo(float, float) Method -Create a [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') out of X, Y, Z coords. +Create a [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') out of an X and Y coord. ```csharp -public static PointInfo CreatePointInfo(float x, float y, float z); +public static PointInfo CreatePointInfo(float x, float y); ``` #### Parameters - + `x` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - + `y` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - - -`z` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - #### Returns [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') diff --git a/Documentation/BTD_Mod_Helper.Api.ModContent.md b/Documentation/BTD_Mod_Helper.Api.ModContent.md index 331f570a1..43994d3e6 100644 --- a/Documentation/BTD_Mod_Helper.Api.ModContent.md +++ b/Documentation/BTD_Mod_Helper.Api.ModContent.md @@ -1274,43 +1274,43 @@ public static TowerSet GetTowerSet() #### Returns [Il2CppAssets.Scripts.Models.TowerSets.TowerSet](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.TowerSets.TowerSet 'Il2CppAssets.Scripts.Models.TowerSets.TowerSet') - + -## ModContent.HasMod(string) Method +## ModContent.HasMod(string, BloonsMod) Method -Returns whether a mod with the given name is installed +Returns whether a mod with the given name is installed, and pass it to the out param if it is ```csharp -public static bool HasMod(string name); +public static bool HasMod(string name, out BTD_Mod_Helper.BloonsMod bloonsMod); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + +`bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## ModContent.HasMod(string, BloonsMod) Method +## ModContent.HasMod(string) Method -Returns whether a mod with the given name is installed, and pass it to the out param if it is +Returns whether a mod with the given name is installed ```csharp -public static bool HasMod(string name, out BTD_Mod_Helper.BloonsMod bloonsMod); +public static bool HasMod(string name); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - - -`bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') diff --git a/Documentation/BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.md b/Documentation/BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.md index 26ace4952..88afe6ad4 100644 --- a/Documentation/BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.md +++ b/Documentation/BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.md @@ -24,40 +24,40 @@ Derived ↳ [ModVanillaUpgrade](BTD_Mod_Helper.Api.Towers.ModVanillaUpgrade.md 'BTD_Mod_Helper.Api.Towers.ModVanillaUpgrade') ### Methods - + -## ModVanillaContent.Apply(T) Method +## ModVanillaContent.Apply(T, GameModel) Method Applies the modifications to the vanilla content ```csharp -public virtual void Apply(T model); +public virtual void Apply(T model, GameModel gameModel); ``` #### Parameters - + `model` [T](BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.md#BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.T 'BTD_Mod_Helper.Api.Towers.ModVanillaContent.T') - + -## ModVanillaContent.Apply(T, GameModel) Method +`gameModel` [Il2CppAssets.Scripts.Models.GameModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GameModel 'Il2CppAssets.Scripts.Models.GameModel') + + + +## ModVanillaContent.Apply(T) Method Applies the modifications to the vanilla content ```csharp -public virtual void Apply(T model, GameModel gameModel); +public virtual void Apply(T model); ``` #### Parameters - + `model` [T](BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.md#BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.T 'BTD_Mod_Helper.Api.Towers.ModVanillaContent.T') - - -`gameModel` [Il2CppAssets.Scripts.Models.GameModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GameModel 'Il2CppAssets.Scripts.Models.GameModel') - ## ModVanillaContent.GetAffected(GameModel) Method diff --git a/Documentation/BTD_Mod_Helper.BloonsTD6Mod.md b/Documentation/BTD_Mod_Helper.BloonsTD6Mod.md index 5d4f2733a..db6fe5454 100644 --- a/Documentation/BTD_Mod_Helper.BloonsTD6Mod.md +++ b/Documentation/BTD_Mod_Helper.BloonsTD6Mod.md @@ -545,23 +545,6 @@ public virtual void OnModelLoaded(Factory factory, string ModelToLoad, System.Ac `action` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') - - -## BloonsTD6Mod.OnNewGameModel(GameModel) Method - -Called when a new GameModel is created, aka when things like Monkey Knowledge are applied to towers -
-Equivalent to a HarmonyPostFix on GameModel.CreatedModded - -```csharp -public virtual void OnNewGameModel(GameModel result); -``` -#### Parameters - - - -`result` [Il2CppAssets.Scripts.Models.GameModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GameModel 'Il2CppAssets.Scripts.Models.GameModel') - ## BloonsTD6Mod.OnNewGameModel(GameModel, List) Method @@ -625,6 +608,23 @@ public virtual void OnNewGameModel(GameModel result, System.Collections.Generic. `mods` [System.Collections.Generic.IReadOnlyList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IReadOnlyList-1 'System.Collections.Generic.IReadOnlyList`1')[Il2CppAssets.Scripts.Models.ModModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.ModModel 'Il2CppAssets.Scripts.Models.ModModel')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IReadOnlyList-1 'System.Collections.Generic.IReadOnlyList`1') + + +## BloonsTD6Mod.OnNewGameModel(GameModel) Method + +Called when a new GameModel is created, aka when things like Monkey Knowledge are applied to towers +
+Equivalent to a HarmonyPostFix on GameModel.CreatedModded + +```csharp +public virtual void OnNewGameModel(GameModel result); +``` +#### Parameters + + + +`result` [Il2CppAssets.Scripts.Models.GameModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GameModel 'Il2CppAssets.Scripts.Models.GameModel') + ## BloonsTD6Mod.OnPauseScreenClosed(PauseScreen) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.md index 9a53ef3fd..94bc91a82 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.md @@ -115,54 +115,54 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel) Method +## AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel, T) Method -Remove the first Behavior of Type T +Removes a specific behavior from a tower ```csharp -public static void RemoveBehavior(this AbilityModel model) +public static void RemoveBehavior(this AbilityModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` - -The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel') - + -## AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.RemoveBehavior_T_(thisAbilityModel,T).T 'BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel, T).T') -Removes a specific behavior from a tower + + +## AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this AbilityModel model, T behavior) +public static void RemoveBehavior(this AbilityModel model) where T : Model; ``` #### Type parameters - + `T` + +The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.RemoveBehavior_T_(thisAbilityModel,T).T 'BTD_Mod_Helper.Extensions.AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel, T).T') - ## AbilityModelBehaviorExt.RemoveBehaviors(this AbilityModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.md b/Documentation/BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.md index d32c5a478..dde6c8bb2 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.md @@ -115,54 +115,54 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## AddBehaviorToBloonModelExt.RemoveBehavior(this AddBehaviorToBloonModel) Method +## AddBehaviorToBloonModelExt.RemoveBehavior(this AddBehaviorToBloonModel, T) Method -Remove the first Behavior of Type T +Removes a specific behavior from a tower ```csharp -public static void RemoveBehavior(this AddBehaviorToBloonModel model) +public static void RemoveBehavior(this AddBehaviorToBloonModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` - -The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors.AddBehaviorToBloonModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors.AddBehaviorToBloonModel 'Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors.AddBehaviorToBloonModel') - + -## AddBehaviorToBloonModelExt.RemoveBehavior(this AddBehaviorToBloonModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.md#BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.RemoveBehavior_T_(thisAddBehaviorToBloonModel,T).T 'BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.RemoveBehavior(this AddBehaviorToBloonModel, T).T') -Removes a specific behavior from a tower + + +## AddBehaviorToBloonModelExt.RemoveBehavior(this AddBehaviorToBloonModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this AddBehaviorToBloonModel model, T behavior) +public static void RemoveBehavior(this AddBehaviorToBloonModel model) where T : Model; ``` #### Type parameters - + `T` + +The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors.AddBehaviorToBloonModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors.AddBehaviorToBloonModel 'Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors.AddBehaviorToBloonModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.md#BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.RemoveBehavior_T_(thisAddBehaviorToBloonModel,T).T 'BTD_Mod_Helper.Extensions.AddBehaviorToBloonModelExt.RemoveBehavior(this AddBehaviorToBloonModel, T).T') - ## AddBehaviorToBloonModelExt.RemoveBehaviors(this AddBehaviorToBloonModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.md index f824f2770..3f12e5983 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.md @@ -91,112 +91,112 @@ The Behavior you want #### Returns [System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[T](BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.GetBehaviors_T_(thisAirUnitModel).T 'BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.GetBehaviors(this AirUnitModel).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') - + -## AirUnitModelBehaviorExt.HasBehavior(this AirUnitModel) Method +## AirUnitModelBehaviorExt.HasBehavior(this AirUnitModel, T) Method Check if this has a specific Behavior ```csharp -public static bool HasBehavior(this AirUnitModel model) +public static bool HasBehavior(this AirUnitModel model, out T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you're checking for #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel') + + +`behavior` [T](BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.HasBehavior_T_(thisAirUnitModel,T).T 'BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.HasBehavior(this AirUnitModel, T).T') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## AirUnitModelBehaviorExt.HasBehavior(this AirUnitModel, T) Method +## AirUnitModelBehaviorExt.HasBehavior(this AirUnitModel) Method Check if this has a specific Behavior ```csharp -public static bool HasBehavior(this AirUnitModel model, out T behavior) +public static bool HasBehavior(this AirUnitModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you're checking for #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.HasBehavior_T_(thisAirUnitModel,T).T 'BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.HasBehavior(this AirUnitModel, T).T') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## AirUnitModelBehaviorExt.RemoveBehavior(this AirUnitModel) Method +## AirUnitModelBehaviorExt.RemoveBehavior(this AirUnitModel, T) Method -Remove the first Behavior of Type T +Removes a specific behavior from a tower ```csharp -public static void RemoveBehavior(this AirUnitModel model) +public static void RemoveBehavior(this AirUnitModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel') - + -## AirUnitModelBehaviorExt.RemoveBehavior(this AirUnitModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.RemoveBehavior_T_(thisAirUnitModel,T).T 'BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.RemoveBehavior(this AirUnitModel, T).T') -Removes a specific behavior from a tower + + +## AirUnitModelBehaviorExt.RemoveBehavior(this AirUnitModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this AirUnitModel model, T behavior) +public static void RemoveBehavior(this AirUnitModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.AirUnitModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.RemoveBehavior_T_(thisAirUnitModel,T).T 'BTD_Mod_Helper.Extensions.AirUnitModelBehaviorExt.RemoveBehavior(this AirUnitModel, T).T') - ## AirUnitModelBehaviorExt.RemoveBehaviors(this AirUnitModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.ArrayExt.md b/Documentation/BTD_Mod_Helper.Extensions.ArrayExt.md index 223a1f25d..1091cfed6 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.ArrayExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.ArrayExt.md @@ -108,52 +108,52 @@ Items you want to add #### Returns [T](BTD_Mod_Helper.Extensions.ArrayExt.md#BTD_Mod_Helper.Extensions.ArrayExt.AddTo_T_(thisT[],T[]).T 'BTD_Mod_Helper.Extensions.ArrayExt.AddTo(this T[], T[]).T')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') - + -## ArrayExt.Any(this T[]) Method +## ArrayExt.Any(this T[], Func) Method -Return whether or not there are any elements in this +Return whether or not there are any elements in this that match the predicate ```csharp -public static bool Any(this T[] array); +public static bool Any(this T[] array, System.Func predicate); ``` #### Type parameters - + `T` #### Parameters - + -`array` [T](BTD_Mod_Helper.Extensions.ArrayExt.md#BTD_Mod_Helper.Extensions.ArrayExt.Any_T_(thisT[]).T 'BTD_Mod_Helper.Extensions.ArrayExt.Any(this T[]).T')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') +`array` [T](BTD_Mod_Helper.Extensions.ArrayExt.md#BTD_Mod_Helper.Extensions.ArrayExt.Any_T_(thisT[],System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.ArrayExt.Any(this T[], System.Func).T')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') + + + +`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.ArrayExt.md#BTD_Mod_Helper.Extensions.ArrayExt.Any_T_(thisT[],System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.ArrayExt.Any(this T[], System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## ArrayExt.Any(this T[], Func) Method +## ArrayExt.Any(this T[]) Method -Return whether or not there are any elements in this that match the predicate +Return whether or not there are any elements in this ```csharp -public static bool Any(this T[] array, System.Func predicate); +public static bool Any(this T[] array); ``` #### Type parameters - + `T` #### Parameters - - -`array` [T](BTD_Mod_Helper.Extensions.ArrayExt.md#BTD_Mod_Helper.Extensions.ArrayExt.Any_T_(thisT[],System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.ArrayExt.Any(this T[], System.Func).T')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') - - + -`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.ArrayExt.md#BTD_Mod_Helper.Extensions.ArrayExt.Any_T_(thisT[],System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.ArrayExt.Any(this T[], System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') +`array` [T](BTD_Mod_Helper.Extensions.ArrayExt.md#BTD_Mod_Helper.Extensions.ArrayExt.Any_T_(thisT[]).T 'BTD_Mod_Helper.Extensions.ArrayExt.Any(this T[]).T')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') diff --git a/Documentation/BTD_Mod_Helper.Extensions.AttackBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.AttackBehaviorExt.md index 3f3be23ee..24fa4e991 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.AttackBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.AttackBehaviorExt.md @@ -117,56 +117,56 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## AttackBehaviorExt.RemoveAttackBehavior(this Attack) Method +## AttackBehaviorExt.RemoveAttackBehavior(this Attack, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveAttackBehavior(this Attack attack) +public static void RemoveAttackBehavior(this Attack attack, T behavior) where T : AttackBehavior; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `attack` [Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack 'Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack') - + -## AttackBehaviorExt.RemoveAttackBehavior(this Attack, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.AttackBehaviorExt.md#BTD_Mod_Helper.Extensions.AttackBehaviorExt.RemoveAttackBehavior_T_(thisAttack,T).T 'BTD_Mod_Helper.Extensions.AttackBehaviorExt.RemoveAttackBehavior(this Attack, T).T') -Remove the first Behavior of type T + + +## AttackBehaviorExt.RemoveAttackBehavior(this Attack) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveAttackBehavior(this Attack attack, T behavior) +public static void RemoveAttackBehavior(this Attack attack) where T : AttackBehavior; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `attack` [Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack 'Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack') - - -`behavior` [T](BTD_Mod_Helper.Extensions.AttackBehaviorExt.md#BTD_Mod_Helper.Extensions.AttackBehaviorExt.RemoveAttackBehavior_T_(thisAttack,T).T 'BTD_Mod_Helper.Extensions.AttackBehaviorExt.RemoveAttackBehavior(this Attack, T).T') - ## AttackBehaviorExt.RemoveAttackBehaviors(this Attack) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.md index f4c3264c2..ab0bd4fe6 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.md @@ -91,112 +91,112 @@ The Behavior you want #### Returns [System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[T](BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.GetBehaviors_T_(thisAttackModel).T 'BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.GetBehaviors(this AttackModel).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') - + -## AttackModelBehaviorExt.HasBehavior(this AttackModel) Method +## AttackModelBehaviorExt.HasBehavior(this AttackModel, T) Method Check if this has a specific Behavior ```csharp -public static bool HasBehavior(this AttackModel model) +public static bool HasBehavior(this AttackModel model, out T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you're checking for #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel') + + +`behavior` [T](BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.HasBehavior_T_(thisAttackModel,T).T 'BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.HasBehavior(this AttackModel, T).T') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## AttackModelBehaviorExt.HasBehavior(this AttackModel, T) Method +## AttackModelBehaviorExt.HasBehavior(this AttackModel) Method Check if this has a specific Behavior ```csharp -public static bool HasBehavior(this AttackModel model, out T behavior) +public static bool HasBehavior(this AttackModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you're checking for #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.HasBehavior_T_(thisAttackModel,T).T 'BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.HasBehavior(this AttackModel, T).T') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## AttackModelBehaviorExt.RemoveBehavior(this AttackModel) Method +## AttackModelBehaviorExt.RemoveBehavior(this AttackModel, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveBehavior(this AttackModel model) +public static void RemoveBehavior(this AttackModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel') - + -## AttackModelBehaviorExt.RemoveBehavior(this AttackModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.RemoveBehavior_T_(thisAttackModel,T).T 'BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.RemoveBehavior(this AttackModel, T).T') -Remove the first Behavior of type T + + +## AttackModelBehaviorExt.RemoveBehavior(this AttackModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this AttackModel model, T behavior) +public static void RemoveBehavior(this AttackModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.md#BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.RemoveBehavior_T_(thisAttackModel,T).T 'BTD_Mod_Helper.Extensions.AttackModelBehaviorExt.RemoveBehavior(this AttackModel, T).T') - ## AttackModelBehaviorExt.RemoveBehaviors(this AttackModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.BloonBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.BloonBehaviorExt.md index 50b0d7da8..ce098f1bb 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.BloonBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.BloonBehaviorExt.md @@ -117,56 +117,56 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## BloonBehaviorExt.RemoveBloonBehavior(this Bloon) Method +## BloonBehaviorExt.RemoveBloonBehavior(this Bloon, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveBloonBehavior(this Bloon bloon) +public static void RemoveBloonBehavior(this Bloon bloon, T behavior) where T : BloonBehavior; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `bloon` [Il2CppAssets.Scripts.Simulation.Bloons.Bloon](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Bloons.Bloon 'Il2CppAssets.Scripts.Simulation.Bloons.Bloon') - + -## BloonBehaviorExt.RemoveBloonBehavior(this Bloon, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.BloonBehaviorExt.md#BTD_Mod_Helper.Extensions.BloonBehaviorExt.RemoveBloonBehavior_T_(thisBloon,T).T 'BTD_Mod_Helper.Extensions.BloonBehaviorExt.RemoveBloonBehavior(this Bloon, T).T') -Remove the first Behavior of type T + + +## BloonBehaviorExt.RemoveBloonBehavior(this Bloon) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBloonBehavior(this Bloon bloon, T behavior) +public static void RemoveBloonBehavior(this Bloon bloon) where T : BloonBehavior; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `bloon` [Il2CppAssets.Scripts.Simulation.Bloons.Bloon](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Bloons.Bloon 'Il2CppAssets.Scripts.Simulation.Bloons.Bloon') - - -`behavior` [T](BTD_Mod_Helper.Extensions.BloonBehaviorExt.md#BTD_Mod_Helper.Extensions.BloonBehaviorExt.RemoveBloonBehavior_T_(thisBloon,T).T 'BTD_Mod_Helper.Extensions.BloonBehaviorExt.RemoveBloonBehavior(this Bloon, T).T') - ## BloonBehaviorExt.RemoveBloonBehaviors(this Bloon) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.md index 8ec17df0f..42f61c571 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.md @@ -117,56 +117,56 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## BloonModelBehaviorExt.RemoveBehavior(this BloonModel) Method +## BloonModelBehaviorExt.RemoveBehavior(this BloonModel, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveBehavior(this BloonModel model) +public static void RemoveBehavior(this BloonModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Bloons.BloonModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Bloons.BloonModel 'Il2CppAssets.Scripts.Models.Bloons.BloonModel') - + -## BloonModelBehaviorExt.RemoveBehavior(this BloonModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.md#BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.RemoveBehavior_T_(thisBloonModel,T).T 'BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.RemoveBehavior(this BloonModel, T).T') -Remove the first Behavior of type T + + +## BloonModelBehaviorExt.RemoveBehavior(this BloonModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this BloonModel model, T behavior) +public static void RemoveBehavior(this BloonModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Bloons.BloonModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Bloons.BloonModel 'Il2CppAssets.Scripts.Models.Bloons.BloonModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.md#BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.RemoveBehavior_T_(thisBloonModel,T).T 'BTD_Mod_Helper.Extensions.BloonModelBehaviorExt.RemoveBehavior(this BloonModel, T).T') - ## BloonModelBehaviorExt.RemoveBehaviors(this BloonModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.BloonsTD6ModExt.md b/Documentation/BTD_Mod_Helper.Extensions.BloonsTD6ModExt.md index 924938eab..ab1101579 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.BloonsTD6ModExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.BloonsTD6ModExt.md @@ -12,47 +12,47 @@ public static class BloonsTD6ModExt Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 BloonsTD6ModExt ### Methods - + -## BloonsTD6ModExt.GetModDirectory(this BloonsMod) Method +## BloonsTD6ModExt.GetModDirectory(this BloonsMod, bool) Method Get the personal mod directory for this specific mod. Useful for keeping this mod's files seperate from other mods. Example: "BloonsTD6/Mods/BloonsTD6 Mod Helper/settings.txt" ```csharp -public static string GetModDirectory(this BTD_Mod_Helper.BloonsMod bloonsMod); +public static string GetModDirectory(this BTD_Mod_Helper.BloonsMod bloonsMod, bool createIfNotExists); ``` #### Parameters - + `bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod') + + +`createIfNotExists` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +Create the mod's directory if it doesn't exist yet? + #### Returns [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + -## BloonsTD6ModExt.GetModDirectory(this BloonsMod, bool) Method +## BloonsTD6ModExt.GetModDirectory(this BloonsMod) Method Get the personal mod directory for this specific mod. Useful for keeping this mod's files seperate from other mods. Example: "BloonsTD6/Mods/BloonsTD6 Mod Helper/settings.txt" ```csharp -public static string GetModDirectory(this BTD_Mod_Helper.BloonsMod bloonsMod, bool createIfNotExists); +public static string GetModDirectory(this BTD_Mod_Helper.BloonsMod bloonsMod); ``` #### Parameters - + `bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod') - - -`createIfNotExists` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -Create the mod's directory if it doesn't exist yet? - #### Returns [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') @@ -74,46 +74,46 @@ public static string GetModName(this BTD_Mod_Helper.BloonsMod bloonsMod); #### Returns [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + -## BloonsTD6ModExt.GetModSettingsDir(this BloonsMod) Method +## BloonsTD6ModExt.GetModSettingsDir(this BloonsMod, bool) Method Gets the directory where this mod's settings are or will be stored. Example: "BloonsTD6/Mods/BloonsTD6 Mod Helper/settings.txt" ```csharp -public static string GetModSettingsDir(this BTD_Mod_Helper.BloonsMod bloonsMod); +public static string GetModSettingsDir(this BTD_Mod_Helper.BloonsMod bloonsMod, bool createIfNotExists); ``` #### Parameters - + `bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod') + + +`createIfNotExists` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +Create the mod's directory if it doesn't exist yet? + #### Returns [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + -## BloonsTD6ModExt.GetModSettingsDir(this BloonsMod, bool) Method +## BloonsTD6ModExt.GetModSettingsDir(this BloonsMod) Method Gets the directory where this mod's settings are or will be stored. Example: "BloonsTD6/Mods/BloonsTD6 Mod Helper/settings.txt" ```csharp -public static string GetModSettingsDir(this BTD_Mod_Helper.BloonsMod bloonsMod, bool createIfNotExists); +public static string GetModSettingsDir(this BTD_Mod_Helper.BloonsMod bloonsMod); ``` #### Parameters - + `bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod') - - -`createIfNotExists` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -Create the mod's directory if it doesn't exist yet? - #### Returns [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/Documentation/BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.md index 60f09ef2c..d9015cdd4 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.md @@ -115,54 +115,54 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## EmissionModelBehaviorExt.RemoveBehavior(this EmissionModel) Method +## EmissionModelBehaviorExt.RemoveBehavior(this EmissionModel, T) Method -Remove the first Behavior of Type T +Removes a specific behavior from a tower ```csharp -public static void RemoveBehavior(this EmissionModel model) +public static void RemoveBehavior(this EmissionModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` - -The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions.EmissionModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions.EmissionModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions.EmissionModel') - + -## EmissionModelBehaviorExt.RemoveBehavior(this EmissionModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.md#BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.RemoveBehavior_T_(thisEmissionModel,T).T 'BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.RemoveBehavior(this EmissionModel, T).T') -Removes a specific behavior from a tower + + +## EmissionModelBehaviorExt.RemoveBehavior(this EmissionModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this EmissionModel model, T behavior) +public static void RemoveBehavior(this EmissionModel model) where T : Model; ``` #### Type parameters - + `T` + +The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions.EmissionModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions.EmissionModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions.EmissionModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.md#BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.RemoveBehavior_T_(thisEmissionModel,T).T 'BTD_Mod_Helper.Extensions.EmissionModelBehaviorExt.RemoveBehavior(this EmissionModel, T).T') - ## EmissionModelBehaviorExt.RemoveBehaviors(this EmissionModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.EntityBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.EntityBehaviorExt.md index f7eb59fba..fa330ae07 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.EntityBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.EntityBehaviorExt.md @@ -117,56 +117,56 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## EntityBehaviorExt.RemoveBehavior(this Entity) Method +## EntityBehaviorExt.RemoveBehavior(this Entity, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveBehavior(this Entity entity) +public static void RemoveBehavior(this Entity entity, T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `entity` [Il2CppAssets.Scripts.Simulation.Objects.Entity](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Objects.Entity 'Il2CppAssets.Scripts.Simulation.Objects.Entity') - + -## EntityBehaviorExt.RemoveBehavior(this Entity, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.EntityBehaviorExt.md#BTD_Mod_Helper.Extensions.EntityBehaviorExt.RemoveBehavior_T_(thisEntity,T).T 'BTD_Mod_Helper.Extensions.EntityBehaviorExt.RemoveBehavior(this Entity, T).T') -Remove the first Behavior of type T + + +## EntityBehaviorExt.RemoveBehavior(this Entity) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this Entity entity, T behavior) +public static void RemoveBehavior(this Entity entity) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `entity` [Il2CppAssets.Scripts.Simulation.Objects.Entity](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Objects.Entity 'Il2CppAssets.Scripts.Simulation.Objects.Entity') - - -`behavior` [T](BTD_Mod_Helper.Extensions.EntityBehaviorExt.md#BTD_Mod_Helper.Extensions.EntityBehaviorExt.RemoveBehavior_T_(thisEntity,T).T 'BTD_Mod_Helper.Extensions.EntityBehaviorExt.RemoveBehavior(this Entity, T).T') - ## EntityBehaviorExt.RemoveBehaviors(this Entity) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.GameModelExt.md b/Documentation/BTD_Mod_Helper.Extensions.GameModelExt.md index 6b80351fe..bcf27eef4 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.GameModelExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.GameModelExt.md @@ -35,25 +35,6 @@ public static void AddHeroDetails(this GameModel model, HeroDetailsModel heroDet `index` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - - -## GameModelExt.AddTowerDetails(this GameModel, TowerDetailsModel) Method - -Adds a tower - -```csharp -public static void AddTowerDetails(this GameModel model, TowerDetailsModel towerDetailsModel); -``` -#### Parameters - - - -`model` [Il2CppAssets.Scripts.Models.GameModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GameModel 'Il2CppAssets.Scripts.Models.GameModel') - - - -`towerDetailsModel` [Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel 'Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel') - ## GameModelExt.AddTowerDetails(this GameModel, TowerDetailsModel, int) Method @@ -109,6 +90,25 @@ The TowerDetailsModel to be added The TowerSet of the tower to be added + + +## GameModelExt.AddTowerDetails(this GameModel, TowerDetailsModel) Method + +Adds a tower + +```csharp +public static void AddTowerDetails(this GameModel model, TowerDetailsModel towerDetailsModel); +``` +#### Parameters + + + +`model` [Il2CppAssets.Scripts.Models.GameModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GameModel 'Il2CppAssets.Scripts.Models.GameModel') + + + +`towerDetailsModel` [Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel 'Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel') + ## GameModelExt.AddTowersToGame(this GameModel, IEnumerable) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.GameObjectExt.md b/Documentation/BTD_Mod_Helper.Extensions.GameObjectExt.md index 14536c361..91d69a087 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.GameObjectExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.GameObjectExt.md @@ -72,30 +72,6 @@ public static void DestroyAllChildren(this GameObject gameObject); `gameObject` [UnityEngine.GameObject](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.GameObject 'UnityEngine.GameObject') - - -## GameObjectExt.Duplicate(this T) Method - -Instantiate a clone of the GameObject keeping the same parent - -```csharp -public static T Duplicate(this T gameObject) - where T : Object; -``` -#### Type parameters - - - -`T` -#### Parameters - - - -`gameObject` [T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate_T_(thisT).T 'BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate(this T).T') - -#### Returns -[T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate_T_(thisT).T 'BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate(this T).T') - ## GameObjectExt.Duplicate(this T, Transform) Method @@ -124,29 +100,29 @@ public static T Duplicate(this T gameObject, Transform parent) #### Returns [T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate_T_(thisT,Transform).T 'BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate(this T, Transform).T') - + -## GameObjectExt.Exists(this T) Method +## GameObjectExt.Duplicate(this T) Method -Used to null check unity objects without bypassing the lifecycle +Instantiate a clone of the GameObject keeping the same parent ```csharp -public static T Exists(this T obj) +public static T Duplicate(this T gameObject) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + -`obj` [T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.Exists_T_(thisT).T 'BTD_Mod_Helper.Extensions.GameObjectExt.Exists(this T).T') +`gameObject` [T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate_T_(thisT).T 'BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate(this T).T') #### Returns -[T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.Exists_T_(thisT).T 'BTD_Mod_Helper.Extensions.GameObjectExt.Exists(this T).T') +[T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate_T_(thisT).T 'BTD_Mod_Helper.Extensions.GameObjectExt.Duplicate(this T).T') @@ -176,6 +152,30 @@ public static bool Exists(this T obj, out T result) #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + + +## GameObjectExt.Exists(this T) Method + +Used to null check unity objects without bypassing the lifecycle + +```csharp +public static T Exists(this T obj) + where T : Object; +``` +#### Type parameters + + + +`T` +#### Parameters + + + +`obj` [T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.Exists_T_(thisT).T 'BTD_Mod_Helper.Extensions.GameObjectExt.Exists(this T).T') + +#### Returns +[T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.Exists_T_(thisT).T 'BTD_Mod_Helper.Extensions.GameObjectExt.Exists(this T).T') + ## GameObjectExt.GetComponent(this GameObject, string) Method @@ -231,55 +231,55 @@ public static T GetComponentInChildrenByName(this GameObject gameObject, stri #### Returns [T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.GetComponentInChildrenByName_T_(thisGameObject,string).T 'BTD_Mod_Helper.Extensions.GameObjectExt.GetComponentInChildrenByName(this GameObject, string).T') - + -## GameObjectExt.HasComponent(this GameObject) Method +## GameObjectExt.HasComponent(this GameObject, T) Method -Returns whether a component of the given type exists on a game object +Returns whether a component of the given type exists on a game object, and puts it in the out param ```csharp -public static bool HasComponent(this GameObject gameObject) +public static bool HasComponent(this GameObject gameObject, out T component) where T : Component; ``` #### Type parameters - + `T` #### Parameters - + `gameObject` [UnityEngine.GameObject](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.GameObject 'UnityEngine.GameObject') + + +`component` [T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.HasComponent_T_(thisGameObject,T).T 'BTD_Mod_Helper.Extensions.GameObjectExt.HasComponent(this GameObject, T).T') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## GameObjectExt.HasComponent(this GameObject, T) Method +## GameObjectExt.HasComponent(this GameObject) Method -Returns whether a component of the given type exists on a game object, and puts it in the out param +Returns whether a component of the given type exists on a game object ```csharp -public static bool HasComponent(this GameObject gameObject, out T component) +public static bool HasComponent(this GameObject gameObject) where T : Component; ``` #### Type parameters - + `T` #### Parameters - + `gameObject` [UnityEngine.GameObject](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.GameObject 'UnityEngine.GameObject') - - -`component` [T](BTD_Mod_Helper.Extensions.GameObjectExt.md#BTD_Mod_Helper.Extensions.GameObjectExt.HasComponent_T_(thisGameObject,T).T 'BTD_Mod_Helper.Extensions.GameObjectExt.HasComponent(this GameObject, T).T') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') diff --git a/Documentation/BTD_Mod_Helper.Extensions.GrowModelExt.md b/Documentation/BTD_Mod_Helper.Extensions.GrowModelExt.md index 4b93211c3..0c58a5c7d 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.GrowModelExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.GrowModelExt.md @@ -30,50 +30,50 @@ public static string GetRegrowBloon(this GrowModel growModel); #### Returns [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + -## GrowModelExt.SetRegrowBloon(this GrowModel, string) Method +## GrowModelExt.SetRegrowBloon(this GrowModel, string, float) Method Sets which bloon this should regrow into. ```csharp -public static void SetRegrowBloon(this GrowModel growModel, string regrowsTo); +public static void SetRegrowBloon(this GrowModel growModel, string regrowsTo, float regrowRate); ``` #### Parameters - + `growModel` [Il2CppAssets.Scripts.Models.Bloons.Behaviors.GrowModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Bloons.Behaviors.GrowModel 'Il2CppAssets.Scripts.Models.Bloons.Behaviors.GrowModel') - + `regrowsTo` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') The ID of the bloon this should regrow into - + -## GrowModelExt.SetRegrowBloon(this GrowModel, string, float) Method +`regrowRate` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') + +The rate at which this regrows. + + + +## GrowModelExt.SetRegrowBloon(this GrowModel, string) Method Sets which bloon this should regrow into. ```csharp -public static void SetRegrowBloon(this GrowModel growModel, string regrowsTo, float regrowRate); +public static void SetRegrowBloon(this GrowModel growModel, string regrowsTo); ``` #### Parameters - + `growModel` [Il2CppAssets.Scripts.Models.Bloons.Behaviors.GrowModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Bloons.Behaviors.GrowModel 'Il2CppAssets.Scripts.Models.Bloons.Behaviors.GrowModel') - + `regrowsTo` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') -The ID of the bloon this should regrow into - - - -`regrowRate` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') - -The rate at which this regrows. \ No newline at end of file +The ID of the bloon this should regrow into \ No newline at end of file diff --git a/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md b/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md index f9649dd36..d1e3ac15e 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md +++ b/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md @@ -12,55 +12,55 @@ public static class Il2CppGenericIEnumerable Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 Il2CppGenericIEnumerable ### Methods - + -## Il2CppGenericIEnumerable.Any(this IEnumerable) Method +## Il2CppGenericIEnumerable.Any(this IEnumerable, Func) Method -Return whether or not there are any elements in this +Return whether or not there are any elements in this that match the predicate ```csharp -public static bool Any(this IEnumerable source) +public static bool Any(this IEnumerable source, System.Func predicate) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppSystem.Collections.Generic.IEnumerable](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.IEnumerable 'Il2CppSystem.Collections.Generic.IEnumerable') + + +`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md#BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.Any_T_(thisIEnumerable_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.Any(this IEnumerable, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## Il2CppGenericIEnumerable.Any(this IEnumerable, Func) Method +## Il2CppGenericIEnumerable.Any(this IEnumerable) Method -Return whether or not there are any elements in this that match the predicate +Return whether or not there are any elements in this ```csharp -public static bool Any(this IEnumerable source, System.Func predicate) +public static bool Any(this IEnumerable source) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppSystem.Collections.Generic.IEnumerable](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.IEnumerable 'Il2CppSystem.Collections.Generic.IEnumerable') - - -`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md#BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.Any_T_(thisIEnumerable_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.Any(this IEnumerable, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') @@ -88,57 +88,57 @@ public static T First(this IEnumerable source) #### Returns [T](BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md#BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.First_T_(thisIEnumerable_T_).T 'BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.First(this IEnumerable).T') - + -## Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable) Method +## Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable, Func) Method -Return the first element in the collection, or return default if it's null +Return the first element that matches the predicate, or return default ```csharp -public static T FirstOrDefault(this IEnumerable source) +public static T FirstOrDefault(this IEnumerable source, System.Func predicate) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppSystem.Collections.Generic.IEnumerable](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.IEnumerable 'Il2CppSystem.Collections.Generic.IEnumerable') + + +`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md#BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault_T_(thisIEnumerable_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') + #### Returns -[T](BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md#BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault_T_(thisIEnumerable_T_).T 'BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable).T') +[T](BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md#BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault_T_(thisIEnumerable_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable, System.Func).T') - + -## Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable, Func) Method +## Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable) Method -Return the first element that matches the predicate, or return default +Return the first element in the collection, or return default if it's null ```csharp -public static T FirstOrDefault(this IEnumerable source, System.Func predicate) +public static T FirstOrDefault(this IEnumerable source) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppSystem.Collections.Generic.IEnumerable](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.IEnumerable 'Il2CppSystem.Collections.Generic.IEnumerable') - - -`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md#BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault_T_(thisIEnumerable_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - #### Returns -[T](BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md#BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault_T_(thisIEnumerable_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable, System.Func).T') +[T](BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.md#BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault_T_(thisIEnumerable_T_).T 'BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerable.FirstOrDefault(this IEnumerable).T') diff --git a/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenerics.md b/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenerics.md index e361de9d6..74a57f303 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenerics.md +++ b/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenerics.md @@ -12,55 +12,55 @@ public static class Il2CppGenerics Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 Il2CppGenerics ### Methods - + -## Il2CppGenerics.Any(this List) Method +## Il2CppGenerics.Any(this List, Func) Method -Return whether or not there are any elements in this +Return whether or not there are any elements in this that match the predicate ```csharp -public static bool Any(this List source) +public static bool Any(this List source, System.Func predicate) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppSystem.Collections.Generic.List](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.List 'Il2CppSystem.Collections.Generic.List') + + +`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.Il2CppGenerics.md#BTD_Mod_Helper.Extensions.Il2CppGenerics.Any_T_(thisList_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenerics.Any(this List, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## Il2CppGenerics.Any(this List, Func) Method +## Il2CppGenerics.Any(this List) Method -Return whether or not there are any elements in this that match the predicate +Return whether or not there are any elements in this ```csharp -public static bool Any(this List source, System.Func predicate) +public static bool Any(this List source) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppSystem.Collections.Generic.List](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.List 'Il2CppSystem.Collections.Generic.List') - - -`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.Il2CppGenerics.md#BTD_Mod_Helper.Extensions.Il2CppGenerics.Any_T_(thisList_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenerics.Any(this List, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') @@ -92,29 +92,6 @@ public static int FindIndex(this List source, System.Func predicat #### Returns [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - - -## Il2CppGenerics.First(this List) Method - -Return the first element in the collection - -```csharp -public static T First(this List source); -``` -#### Type parameters - - - -`T` -#### Parameters - - - -`source` [Il2CppSystem.Collections.Generic.List](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.List 'Il2CppSystem.Collections.Generic.List') - -#### Returns -[T](BTD_Mod_Helper.Extensions.Il2CppGenerics.md#BTD_Mod_Helper.Extensions.Il2CppGenerics.First_T_(thisList_T_).T 'BTD_Mod_Helper.Extensions.Il2CppGenerics.First(this List).T') - ## Il2CppGenerics.First(this List, Func) Method @@ -143,28 +120,28 @@ public static T First(this List source, System.Func predicate) #### Returns [T](BTD_Mod_Helper.Extensions.Il2CppGenerics.md#BTD_Mod_Helper.Extensions.Il2CppGenerics.First_T_(thisList_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenerics.First(this List, System.Func).T') - + -## Il2CppGenerics.FirstOrDefault(this List) Method +## Il2CppGenerics.First(this List) Method -Return the first element in the collection, or return default if it's null +Return the first element in the collection ```csharp -public static T FirstOrDefault(this List source); +public static T First(this List source); ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppSystem.Collections.Generic.List](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.List 'Il2CppSystem.Collections.Generic.List') #### Returns -[T](BTD_Mod_Helper.Extensions.Il2CppGenerics.md#BTD_Mod_Helper.Extensions.Il2CppGenerics.FirstOrDefault_T_(thisList_T_).T 'BTD_Mod_Helper.Extensions.Il2CppGenerics.FirstOrDefault(this List).T') +[T](BTD_Mod_Helper.Extensions.Il2CppGenerics.md#BTD_Mod_Helper.Extensions.Il2CppGenerics.First_T_(thisList_T_).T 'BTD_Mod_Helper.Extensions.Il2CppGenerics.First(this List).T') @@ -194,6 +171,29 @@ public static T FirstOrDefault(this List source, System.Func predi #### Returns [T](BTD_Mod_Helper.Extensions.Il2CppGenerics.md#BTD_Mod_Helper.Extensions.Il2CppGenerics.FirstOrDefault_T_(thisList_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppGenerics.FirstOrDefault(this List, System.Func).T') + + +## Il2CppGenerics.FirstOrDefault(this List) Method + +Return the first element in the collection, or return default if it's null + +```csharp +public static T FirstOrDefault(this List source); +``` +#### Type parameters + + + +`T` +#### Parameters + + + +`source` [Il2CppSystem.Collections.Generic.List](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.Generic.List 'Il2CppSystem.Collections.Generic.List') + +#### Returns +[T](BTD_Mod_Helper.Extensions.Il2CppGenerics.md#BTD_Mod_Helper.Extensions.Il2CppGenerics.FirstOrDefault_T_(thisList_T_).T 'BTD_Mod_Helper.Extensions.Il2CppGenerics.FirstOrDefault(this List).T') + ## Il2CppGenerics.Last(this List) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md b/Documentation/BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md index 052beb9f8..8a95d8cc2 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md +++ b/Documentation/BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md @@ -68,30 +68,6 @@ public static int FindIndex(this IEnumerator source, System.Func pred #### Returns [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - - -## Il2CppIEnumerator.First(this IEnumerator) Method - -Return the first element in the collection - -```csharp -public static T First(this IEnumerator source) - where T : Object; -``` -#### Type parameters - - - -`T` -#### Parameters - - - -`source` [Il2CppSystem.Collections.IEnumerator](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.IEnumerator 'Il2CppSystem.Collections.IEnumerator') - -#### Returns -[T](BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md#BTD_Mod_Helper.Extensions.Il2CppIEnumerator.First_T_(thisIEnumerator).T 'BTD_Mod_Helper.Extensions.Il2CppIEnumerator.First(this IEnumerator).T') - ## Il2CppIEnumerator.First(this IEnumerator, Func) Method @@ -120,29 +96,29 @@ public static T First(this IEnumerator source, System.Func predicate) #### Returns [T](BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md#BTD_Mod_Helper.Extensions.Il2CppIEnumerator.First_T_(thisIEnumerator,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppIEnumerator.First(this IEnumerator, System.Func).T') - + -## Il2CppIEnumerator.FirstOrDefault(this IEnumerator) Method +## Il2CppIEnumerator.First(this IEnumerator) Method -Return the first element in the collection, or return default if it's null +Return the first element in the collection ```csharp -public static T FirstOrDefault(this IEnumerator source) +public static T First(this IEnumerator source) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppSystem.Collections.IEnumerator](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.IEnumerator 'Il2CppSystem.Collections.IEnumerator') #### Returns -[T](BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md#BTD_Mod_Helper.Extensions.Il2CppIEnumerator.FirstOrDefault_T_(thisIEnumerator).T 'BTD_Mod_Helper.Extensions.Il2CppIEnumerator.FirstOrDefault(this IEnumerator).T') +[T](BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md#BTD_Mod_Helper.Extensions.Il2CppIEnumerator.First_T_(thisIEnumerator).T 'BTD_Mod_Helper.Extensions.Il2CppIEnumerator.First(this IEnumerator).T') @@ -172,6 +148,30 @@ public static T FirstOrDefault(this IEnumerator source, System.Func p #### Returns [T](BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md#BTD_Mod_Helper.Extensions.Il2CppIEnumerator.FirstOrDefault_T_(thisIEnumerator,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppIEnumerator.FirstOrDefault(this IEnumerator, System.Func).T') + + +## Il2CppIEnumerator.FirstOrDefault(this IEnumerator) Method + +Return the first element in the collection, or return default if it's null + +```csharp +public static T FirstOrDefault(this IEnumerator source) + where T : Object; +``` +#### Type parameters + + + +`T` +#### Parameters + + + +`source` [Il2CppSystem.Collections.IEnumerator](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Collections.IEnumerator 'Il2CppSystem.Collections.IEnumerator') + +#### Returns +[T](BTD_Mod_Helper.Extensions.Il2CppIEnumerator.md#BTD_Mod_Helper.Extensions.Il2CppIEnumerator.FirstOrDefault_T_(thisIEnumerator).T 'BTD_Mod_Helper.Extensions.Il2CppIEnumerator.FirstOrDefault(this IEnumerator).T') + ## Il2CppIEnumerator.ForEach(this IEnumerator, Action) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.Il2CppReferenceArray.md b/Documentation/BTD_Mod_Helper.Extensions.Il2CppReferenceArray.md index 0154e243d..efa8e10d8 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.Il2CppReferenceArray.md +++ b/Documentation/BTD_Mod_Helper.Extensions.Il2CppReferenceArray.md @@ -12,55 +12,55 @@ public static class Il2CppReferenceArray Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 Il2CppReferenceArray ### Methods - + -## Il2CppReferenceArray.Any(this Il2CppReferenceArray) Method +## Il2CppReferenceArray.Any(this Il2CppReferenceArray, Func) Method -Return whether or not there are any elements in this +Return whether or not there are any elements in this that match the predicate ```csharp -public static bool Any(this Il2CppReferenceArray source) +public static bool Any(this Il2CppReferenceArray source, System.Func predicate) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') + + +`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.Il2CppReferenceArray.md#BTD_Mod_Helper.Extensions.Il2CppReferenceArray.Any_T_(thisIl2CppReferenceArray_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppReferenceArray.Any(this Il2CppReferenceArray, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## Il2CppReferenceArray.Any(this Il2CppReferenceArray, Func) Method +## Il2CppReferenceArray.Any(this Il2CppReferenceArray) Method -Return whether or not there are any elements in this that match the predicate +Return whether or not there are any elements in this ```csharp -public static bool Any(this Il2CppReferenceArray source, System.Func predicate) +public static bool Any(this Il2CppReferenceArray source) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') - - -`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.Il2CppReferenceArray.md#BTD_Mod_Helper.Extensions.Il2CppReferenceArray.Any_T_(thisIl2CppReferenceArray_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.Il2CppReferenceArray.Any(this Il2CppReferenceArray, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') diff --git a/Documentation/BTD_Mod_Helper.Extensions.Il2CppReferenceArrayExt.md b/Documentation/BTD_Mod_Helper.Extensions.Il2CppReferenceArrayExt.md index 4261568cc..4cdf82b8f 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.Il2CppReferenceArrayExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.Il2CppReferenceArrayExt.md @@ -336,37 +336,6 @@ The specific Item to remove #### Returns [Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') - - -## Il2CppReferenceArrayExt.RemoveItemOfType(this Il2CppReferenceArray) Method - -Return this with the first Item of type TCast removed - -```csharp -public static Il2CppReferenceArray RemoveItemOfType(this Il2CppReferenceArray referenceArray) - where TSource : Object - where TCast : Object; -``` -#### Type parameters - - - -`TSource` - - - -`TCast` - -The Type of the Item you want to remove -#### Parameters - - - -`referenceArray` [Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') - -#### Returns -[Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') - ## Il2CppReferenceArrayExt.RemoveItemOfType(this Il2CppReferenceArray, Model) Method @@ -404,31 +373,31 @@ Model to remove the child dependents from #### Returns [Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') - + -## Il2CppReferenceArrayExt.RemoveItemsOfType(this Il2CppReferenceArray) Method +## Il2CppReferenceArrayExt.RemoveItemOfType(this Il2CppReferenceArray) Method -Return this with all Items of type TCast removed +Return this with the first Item of type TCast removed ```csharp -public static Il2CppReferenceArray RemoveItemsOfType(this Il2CppReferenceArray referenceArray) +public static Il2CppReferenceArray RemoveItemOfType(this Il2CppReferenceArray referenceArray) where TSource : Object where TCast : Object; ``` #### Type parameters - + `TSource` - + `TCast` -The Type of the Items that you want to remove +The Type of the Item you want to remove #### Parameters - + `referenceArray` [Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') @@ -472,6 +441,37 @@ Model to remove the child dependents from #### Returns [Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') + + +## Il2CppReferenceArrayExt.RemoveItemsOfType(this Il2CppReferenceArray) Method + +Return this with all Items of type TCast removed + +```csharp +public static Il2CppReferenceArray RemoveItemsOfType(this Il2CppReferenceArray referenceArray) + where TSource : Object + where TCast : Object; +``` +#### Type parameters + + + +`TSource` + + + +`TCast` + +The Type of the Items that you want to remove +#### Parameters + + + +`referenceArray` [Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') + +#### Returns +[Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray 'Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray') + ## Il2CppReferenceArrayExt.ToArray(this Il2CppReferenceArray) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.md b/Documentation/BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.md index b3d69125c..0b08628f4 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.md @@ -12,61 +12,61 @@ public static class Il2CppSystemObjectExt Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 Il2CppSystemObjectExt ### Methods - + -## Il2CppSystemObjectExt.Is(this Il2CppObjectBase) Method +## Il2CppSystemObjectExt.Is(this Il2CppObjectBase, T) Method Check if object is the same type as T ```csharp -public static bool Is(this Il2CppObjectBase instance) +public static bool Is(this Il2CppObjectBase instance, out T castObject) where T : Il2CppObjectBase; ``` #### Type parameters - + `T` Type to check #### Parameters - + `instance` [Il2CppInterop.Runtime.InteropTypes.Il2CppObjectBase](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Il2CppObjectBase 'Il2CppInterop.Runtime.InteropTypes.Il2CppObjectBase') + + +`castObject` [T](BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.md#BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.Is_T_(thisIl2CppObjectBase,T).T 'BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.Is(this Il2CppObjectBase, T).T') + +The casted object if this is of type T + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## Il2CppSystemObjectExt.Is(this Il2CppObjectBase, T) Method +## Il2CppSystemObjectExt.Is(this Il2CppObjectBase) Method Check if object is the same type as T ```csharp -public static bool Is(this Il2CppObjectBase instance, out T castObject) +public static bool Is(this Il2CppObjectBase instance) where T : Il2CppObjectBase; ``` #### Type parameters - + `T` Type to check #### Parameters - + `instance` [Il2CppInterop.Runtime.InteropTypes.Il2CppObjectBase](https://docs.microsoft.com/en-us/dotnet/api/Il2CppInterop.Runtime.InteropTypes.Il2CppObjectBase 'Il2CppInterop.Runtime.InteropTypes.Il2CppObjectBase') - - -`castObject` [T](BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.md#BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.Is_T_(thisIl2CppObjectBase,T).T 'BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.Is(this Il2CppObjectBase, T).T') - -The casted object if this is of type T - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') @@ -102,61 +102,61 @@ The casted object if this is of type T #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## Il2CppSystemObjectExt.IsType(this Object) Method +## Il2CppSystemObjectExt.IsType(this Object, T) Method Check if object is the same type as T ```csharp -public static bool IsType(this Object instance) +public static bool IsType(this Object instance, out T castObject) where T : Object; ``` #### Type parameters - + `T` Type to check #### Parameters - + `instance` [Il2CppSystem.Object](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Object 'Il2CppSystem.Object') + + +`castObject` [T](BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.md#BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.IsType_T_(thisObject,T).T 'BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.IsType(this Object, T).T') + +The casted object if this is of type T + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## Il2CppSystemObjectExt.IsType(this Object, T) Method +## Il2CppSystemObjectExt.IsType(this Object) Method Check if object is the same type as T ```csharp -public static bool IsType(this Object instance, out T castObject) +public static bool IsType(this Object instance) where T : Object; ``` #### Type parameters - + `T` Type to check #### Parameters - + `instance` [Il2CppSystem.Object](https://docs.microsoft.com/en-us/dotnet/api/Il2CppSystem.Object 'Il2CppSystem.Object') - - -`castObject` [T](BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.md#BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.IsType_T_(thisObject,T).T 'BTD_Mod_Helper.Extensions.Il2CppSystemObjectExt.IsType(this Object, T).T') - -The casted object if this is of type T - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') diff --git a/Documentation/BTD_Mod_Helper.Extensions.ListExt.md b/Documentation/BTD_Mod_Helper.Extensions.ListExt.md index 3ccb4df88..f373e7ca3 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.ListExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.ListExt.md @@ -157,70 +157,70 @@ The Type you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## ListExt.LoadFromFile(this List, string) Method +## ListExt.LoadFromFile(this List, string, bool) Method Load a List from a FilePath ```csharp -public static T LoadFromFile(this System.Collections.Generic.List list, string filePath); +public static T LoadFromFile(this System.Collections.Generic.List list, string filePath, out bool success); ``` #### Type parameters - + `T` #### Parameters - + -`list` [System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[T](BTD_Mod_Helper.Extensions.ListExt.md#BTD_Mod_Helper.Extensions.ListExt.LoadFromFile_T_(thisSystem.Collections.Generic.List_T_,string).T 'BTD_Mod_Helper.Extensions.ListExt.LoadFromFile(this System.Collections.Generic.List, string).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') +`list` [System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[T](BTD_Mod_Helper.Extensions.ListExt.md#BTD_Mod_Helper.Extensions.ListExt.LoadFromFile_T_(thisSystem.Collections.Generic.List_T_,string,bool).T 'BTD_Mod_Helper.Extensions.ListExt.LoadFromFile(this System.Collections.Generic.List, string, bool).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') - + `filePath` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') FilePath of the saved List + + +`success` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +Will be true if the List was successfully loaded, otherwise will be false + #### Returns -[T](BTD_Mod_Helper.Extensions.ListExt.md#BTD_Mod_Helper.Extensions.ListExt.LoadFromFile_T_(thisSystem.Collections.Generic.List_T_,string).T 'BTD_Mod_Helper.Extensions.ListExt.LoadFromFile(this System.Collections.Generic.List, string).T') +[T](BTD_Mod_Helper.Extensions.ListExt.md#BTD_Mod_Helper.Extensions.ListExt.LoadFromFile_T_(thisSystem.Collections.Generic.List_T_,string,bool).T 'BTD_Mod_Helper.Extensions.ListExt.LoadFromFile(this System.Collections.Generic.List, string, bool).T') The loaded List if successful, otherwise default value - + -## ListExt.LoadFromFile(this List, string, bool) Method +## ListExt.LoadFromFile(this List, string) Method Load a List from a FilePath ```csharp -public static T LoadFromFile(this System.Collections.Generic.List list, string filePath, out bool success); +public static T LoadFromFile(this System.Collections.Generic.List list, string filePath); ``` #### Type parameters - + `T` #### Parameters - + -`list` [System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[T](BTD_Mod_Helper.Extensions.ListExt.md#BTD_Mod_Helper.Extensions.ListExt.LoadFromFile_T_(thisSystem.Collections.Generic.List_T_,string,bool).T 'BTD_Mod_Helper.Extensions.ListExt.LoadFromFile(this System.Collections.Generic.List, string, bool).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') +`list` [System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[T](BTD_Mod_Helper.Extensions.ListExt.md#BTD_Mod_Helper.Extensions.ListExt.LoadFromFile_T_(thisSystem.Collections.Generic.List_T_,string).T 'BTD_Mod_Helper.Extensions.ListExt.LoadFromFile(this System.Collections.Generic.List, string).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') - + `filePath` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') FilePath of the saved List - - -`success` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -Will be true if the List was successfully loaded, otherwise will be false - #### Returns -[T](BTD_Mod_Helper.Extensions.ListExt.md#BTD_Mod_Helper.Extensions.ListExt.LoadFromFile_T_(thisSystem.Collections.Generic.List_T_,string,bool).T 'BTD_Mod_Helper.Extensions.ListExt.LoadFromFile(this System.Collections.Generic.List, string, bool).T') +[T](BTD_Mod_Helper.Extensions.ListExt.md#BTD_Mod_Helper.Extensions.ListExt.LoadFromFile_T_(thisSystem.Collections.Generic.List_T_,string).T 'BTD_Mod_Helper.Extensions.ListExt.LoadFromFile(this System.Collections.Generic.List, string).T') The loaded List if successful, otherwise default value diff --git a/Documentation/BTD_Mod_Helper.Extensions.LockedList.md b/Documentation/BTD_Mod_Helper.Extensions.LockedList.md index 1ced25d0a..cb028dd09 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.LockedList.md +++ b/Documentation/BTD_Mod_Helper.Extensions.LockedList.md @@ -12,55 +12,55 @@ public static class LockedList Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 LockedList ### Methods - + -## LockedList.Any(this LockList) Method +## LockedList.Any(this LockList, Func) Method -Return whether or not there are any elements in this +Return whether or not there are any elements in this that match the predicate ```csharp -public static bool Any(this LockList source) +public static bool Any(this LockList source, System.Func predicate) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppAssets.Scripts.Utils.LockList](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Utils.LockList 'Il2CppAssets.Scripts.Utils.LockList') + + +`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.LockedList.md#BTD_Mod_Helper.Extensions.LockedList.Any_T_(thisLockList_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.LockedList.Any(this LockList, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## LockedList.Any(this LockList, Func) Method +## LockedList.Any(this LockList) Method -Return whether or not there are any elements in this that match the predicate +Return whether or not there are any elements in this ```csharp -public static bool Any(this LockList source, System.Func predicate) +public static bool Any(this LockList source) where T : Object; ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppAssets.Scripts.Utils.LockList](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Utils.LockList 'Il2CppAssets.Scripts.Utils.LockList') - - -`predicate` [System.Func<](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[T](BTD_Mod_Helper.Extensions.LockedList.md#BTD_Mod_Helper.Extensions.LockedList.Any_T_(thisLockList_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.LockedList.Any(this LockList, System.Func).T')[,](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Func-2 'System.Func`2') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') @@ -92,29 +92,6 @@ public static int FindIndex(this LockList source, System.Func pred #### Returns [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - - -## LockedList.First(this LockList) Method - -Return the first element in the collection - -```csharp -public static T First(this LockList source); -``` -#### Type parameters - - - -`T` -#### Parameters - - - -`source` [Il2CppAssets.Scripts.Utils.LockList](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Utils.LockList 'Il2CppAssets.Scripts.Utils.LockList') - -#### Returns -[T](BTD_Mod_Helper.Extensions.LockedList.md#BTD_Mod_Helper.Extensions.LockedList.First_T_(thisLockList_T_).T 'BTD_Mod_Helper.Extensions.LockedList.First(this LockList).T') - ## LockedList.First(this LockList, Func) Method @@ -143,28 +120,28 @@ public static T First(this LockList source, System.Func predicate) #### Returns [T](BTD_Mod_Helper.Extensions.LockedList.md#BTD_Mod_Helper.Extensions.LockedList.First_T_(thisLockList_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.LockedList.First(this LockList, System.Func).T') - + -## LockedList.FirstOrDefault(this LockList) Method +## LockedList.First(this LockList) Method -Return the first element in the collection, or return default if it's null +Return the first element in the collection ```csharp -public static T FirstOrDefault(this LockList source); +public static T First(this LockList source); ``` #### Type parameters - + `T` #### Parameters - + `source` [Il2CppAssets.Scripts.Utils.LockList](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Utils.LockList 'Il2CppAssets.Scripts.Utils.LockList') #### Returns -[T](BTD_Mod_Helper.Extensions.LockedList.md#BTD_Mod_Helper.Extensions.LockedList.FirstOrDefault_T_(thisLockList_T_).T 'BTD_Mod_Helper.Extensions.LockedList.FirstOrDefault(this LockList).T') +[T](BTD_Mod_Helper.Extensions.LockedList.md#BTD_Mod_Helper.Extensions.LockedList.First_T_(thisLockList_T_).T 'BTD_Mod_Helper.Extensions.LockedList.First(this LockList).T') @@ -194,6 +171,29 @@ public static T FirstOrDefault(this LockList source, System.Func p #### Returns [T](BTD_Mod_Helper.Extensions.LockedList.md#BTD_Mod_Helper.Extensions.LockedList.FirstOrDefault_T_(thisLockList_T_,System.Func_T,bool_).T 'BTD_Mod_Helper.Extensions.LockedList.FirstOrDefault(this LockList, System.Func).T') + + +## LockedList.FirstOrDefault(this LockList) Method + +Return the first element in the collection, or return default if it's null + +```csharp +public static T FirstOrDefault(this LockList source); +``` +#### Type parameters + + + +`T` +#### Parameters + + + +`source` [Il2CppAssets.Scripts.Utils.LockList](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Utils.LockList 'Il2CppAssets.Scripts.Utils.LockList') + +#### Returns +[T](BTD_Mod_Helper.Extensions.LockedList.md#BTD_Mod_Helper.Extensions.LockedList.FirstOrDefault_T_(thisLockList_T_).T 'BTD_Mod_Helper.Extensions.LockedList.FirstOrDefault(this LockList).T') + ## LockedList.ForEach(this LockList, Action) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.ModModelExt.md b/Documentation/BTD_Mod_Helper.Extensions.ModModelExt.md index 4ad354495..33b720f33 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.ModModelExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.ModModelExt.md @@ -31,32 +31,6 @@ public static void AddMutator(this ModModel model, MutatorModModel mutator); `mutator` [Il2CppAssets.Scripts.Models.MutatorModModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.MutatorModModel 'Il2CppAssets.Scripts.Models.MutatorModModel') - - -## ModModelExt.GetMutator(this ModModel) Method - -Return the first Mutator of type T, or null if there isn't one - -```csharp -public static T GetMutator(this ModModel model) - where T : MutatorModModel; -``` -#### Type parameters - - - -`T` - -The Mutator you want -#### Parameters - - - -`model` [Il2CppAssets.Scripts.Models.ModModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.ModModel 'Il2CppAssets.Scripts.Models.ModModel') - -#### Returns -[T](BTD_Mod_Helper.Extensions.ModModelExt.md#BTD_Mod_Helper.Extensions.ModModelExt.GetMutator_T_(thisModModel).T 'BTD_Mod_Helper.Extensions.ModModelExt.GetMutator(this ModModel).T') - ## ModModelExt.GetMutator(this ModModel, int) Method @@ -117,57 +91,57 @@ The Mutator you want #### Returns [T](BTD_Mod_Helper.Extensions.ModModelExt.md#BTD_Mod_Helper.Extensions.ModModelExt.GetMutator_T_(thisModModel,string).T 'BTD_Mod_Helper.Extensions.ModModelExt.GetMutator(this ModModel, string).T') - + -## ModModelExt.GetMutators(this ModModel) Method +## ModModelExt.GetMutator(this ModModel) Method -Return all Mutators of type T +Return the first Mutator of type T, or null if there isn't one ```csharp -public static System.Collections.Generic.IEnumerable GetMutators(this ModModel model) +public static T GetMutator(this ModModel model) where T : MutatorModModel; ``` #### Type parameters - + `T` The Mutator you want #### Parameters - + `model` [Il2CppAssets.Scripts.Models.ModModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.ModModel 'Il2CppAssets.Scripts.Models.ModModel') #### Returns -[System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[T](BTD_Mod_Helper.Extensions.ModModelExt.md#BTD_Mod_Helper.Extensions.ModModelExt.GetMutators_T_(thisModModel).T 'BTD_Mod_Helper.Extensions.ModModelExt.GetMutators(this ModModel).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') +[T](BTD_Mod_Helper.Extensions.ModModelExt.md#BTD_Mod_Helper.Extensions.ModModelExt.GetMutator_T_(thisModModel).T 'BTD_Mod_Helper.Extensions.ModModelExt.GetMutator(this ModModel).T') - + -## ModModelExt.HasMutator(this ModModel) Method +## ModModelExt.GetMutators(this ModModel) Method -Check if this has a specific Mutator +Return all Mutators of type T ```csharp -public static bool HasMutator(this ModModel model) +public static System.Collections.Generic.IEnumerable GetMutators(this ModModel model) where T : MutatorModModel; ``` #### Type parameters - + `T` -The Mutator you're checking for +The Mutator you want #### Parameters - + `model` [Il2CppAssets.Scripts.Models.ModModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.ModModel 'Il2CppAssets.Scripts.Models.ModModel') #### Returns -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') +[System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[T](BTD_Mod_Helper.Extensions.ModModelExt.md#BTD_Mod_Helper.Extensions.ModModelExt.GetMutators_T_(thisModModel).T 'BTD_Mod_Helper.Extensions.ModModelExt.GetMutators(this ModModel).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') @@ -199,6 +173,32 @@ The Mutator you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + + +## ModModelExt.HasMutator(this ModModel) Method + +Check if this has a specific Mutator + +```csharp +public static bool HasMutator(this ModModel model) + where T : MutatorModModel; +``` +#### Type parameters + + + +`T` + +The Mutator you're checking for +#### Parameters + + + +`model` [Il2CppAssets.Scripts.Models.ModModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.ModModel 'Il2CppAssets.Scripts.Models.ModModel') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + ## ModModelExt.LockTowerSet(this ModModel, TowerSet, bool) Method @@ -245,29 +245,6 @@ public static void RemoveMutator(this ModModel model, MutatorModModel mutator); `mutator` [Il2CppAssets.Scripts.Models.MutatorModModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.MutatorModModel 'Il2CppAssets.Scripts.Models.MutatorModModel') - - -## ModModelExt.RemoveMutator(this ModModel) Method - -Remove the first Mutator of Type T - -```csharp -public static void RemoveMutator(this ModModel model) - where T : MutatorModModel; -``` -#### Type parameters - - - -`T` - -The Mutator you want to remove -#### Parameters - - - -`model` [Il2CppAssets.Scripts.Models.ModModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.ModModel 'Il2CppAssets.Scripts.Models.ModModel') - ## ModModelExt.RemoveMutator(this ModModel, int) Method @@ -322,6 +299,29 @@ The Mutator you want to remove `nameContains` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + +## ModModelExt.RemoveMutator(this ModModel) Method + +Remove the first Mutator of Type T + +```csharp +public static void RemoveMutator(this ModModel model) + where T : MutatorModModel; +``` +#### Type parameters + + + +`T` + +The Mutator you want to remove +#### Parameters + + + +`model` [Il2CppAssets.Scripts.Models.ModModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.ModModel 'Il2CppAssets.Scripts.Models.ModModel') + ## ModModelExt.RemoveMutators(this ModModel, Func) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.ModelExt.md b/Documentation/BTD_Mod_Helper.Extensions.ModelExt.md index 358692c1d..bac4fa75a 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.ModelExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.ModelExt.md @@ -38,61 +38,61 @@ public static void AddChildDependants(this Model model, System.Collections.Ge `children` [System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.AddChildDependants_T_(thisModel,System.Collections.Generic.IEnumerable_T_).T 'BTD_Mod_Helper.Extensions.ModelExt.AddChildDependants(this Model, System.Collections.Generic.IEnumerable).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') - + -## ModelExt.Duplicate(this T) Method +## ModelExt.Duplicate(this T, string) Method -Create a new and separate copy of this object. Same as using: .Clone().Cast(); +Duplicates a model and also sets its name to something new ```csharp -public static T Duplicate(this T model) +public static T Duplicate(this T model, string name) where T : Model; ``` #### Type parameters - + `T` Type of object you want to cast to when duplicating. Done automatically #### Parameters - + -`model` [T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.Duplicate_T_(thisT).T 'BTD_Mod_Helper.Extensions.ModelExt.Duplicate(this T).T') +`model` [T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.Duplicate_T_(thisT,string).T 'BTD_Mod_Helper.Extensions.ModelExt.Duplicate(this T, string).T') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') #### Returns -[T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.Duplicate_T_(thisT).T 'BTD_Mod_Helper.Extensions.ModelExt.Duplicate(this T).T') +[T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.Duplicate_T_(thisT,string).T 'BTD_Mod_Helper.Extensions.ModelExt.Duplicate(this T, string).T') - + -## ModelExt.Duplicate(this T, string) Method +## ModelExt.Duplicate(this T) Method -Duplicates a model and also sets its name to something new +Create a new and separate copy of this object. Same as using: .Clone().Cast(); ```csharp -public static T Duplicate(this T model, string name) +public static T Duplicate(this T model) where T : Model; ``` #### Type parameters - + `T` Type of object you want to cast to when duplicating. Done automatically #### Parameters - - -`model` [T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.Duplicate_T_(thisT,string).T 'BTD_Mod_Helper.Extensions.ModelExt.Duplicate(this T, string).T') - - + -`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') +`model` [T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.Duplicate_T_(thisT).T 'BTD_Mod_Helper.Extensions.ModelExt.Duplicate(this T).T') #### Returns -[T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.Duplicate_T_(thisT,string).T 'BTD_Mod_Helper.Extensions.ModelExt.Duplicate(this T, string).T') +[T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.Duplicate_T_(thisT).T 'BTD_Mod_Helper.Extensions.ModelExt.Duplicate(this T).T') @@ -150,30 +150,6 @@ public static T FindDescendant(this Model model, System.Predicate conditio #### Returns [T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.FindDescendant_T_(thisModel,System.Predicate_T_).T 'BTD_Mod_Helper.Extensions.ModelExt.FindDescendant(this Model, System.Predicate).T') - - -## ModelExt.FindDescendants(this Model) Method - -Finds the descendents of a given type - -```csharp -public static T[] FindDescendants(this Model model) - where T : Model; -``` -#### Type parameters - - - -`T` -#### Parameters - - - -`model` [Il2CppAssets.Scripts.Models.Model](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Model 'Il2CppAssets.Scripts.Models.Model') - -#### Returns -[T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.FindDescendants_T_(thisModel).T 'BTD_Mod_Helper.Extensions.ModelExt.FindDescendants(this Model).T')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') - ## ModelExt.FindDescendants(this Model, string) Method @@ -230,29 +206,29 @@ public static T[] FindDescendants(this Model model, System.Predicate condi #### Returns [T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.FindDescendants_T_(thisModel,System.Predicate_T_).T 'BTD_Mod_Helper.Extensions.ModelExt.FindDescendants(this Model, System.Predicate).T')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') - + -## ModelExt.HasDescendant(this Model) Method +## ModelExt.FindDescendants(this Model) Method -Returns whether a model has a descendant of a given type +Finds the descendents of a given type ```csharp -public static bool HasDescendant(this Model model) +public static T[] FindDescendants(this Model model) where T : Model; ``` #### Type parameters - + `T` #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Model](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Model 'Il2CppAssets.Scripts.Models.Model') #### Returns -[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') +[T](BTD_Mod_Helper.Extensions.ModelExt.md#BTD_Mod_Helper.Extensions.ModelExt.FindDescendants_T_(thisModel).T 'BTD_Mod_Helper.Extensions.ModelExt.FindDescendants(this Model).T')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') @@ -314,6 +290,30 @@ public static bool HasDescendant(this Model model, out T t) #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + + +## ModelExt.HasDescendant(this Model) Method + +Returns whether a model has a descendant of a given type + +```csharp +public static bool HasDescendant(this Model model) + where T : Model; +``` +#### Type parameters + + + +`T` +#### Parameters + + + +`model` [Il2CppAssets.Scripts.Models.Model](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Model 'Il2CppAssets.Scripts.Models.Model') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + ## ModelExt.RemoveChildDependants(this Model, IEnumerable) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.PetModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.PetModelBehaviorExt.md index b68356c2e..73969232c 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.PetModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.PetModelBehaviorExt.md @@ -115,54 +115,54 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## PetModelBehaviorExt.RemoveBehavior(this PetModel) Method +## PetModelBehaviorExt.RemoveBehavior(this PetModel, T) Method -Remove the first Behavior of Type T +Removes a specific behavior from a tower ```csharp -public static void RemoveBehavior(this PetModel model) +public static void RemoveBehavior(this PetModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` - -The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Pets.PetModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Pets.PetModel 'Il2CppAssets.Scripts.Models.Towers.Pets.PetModel') - + -## PetModelBehaviorExt.RemoveBehavior(this PetModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.PetModelBehaviorExt.md#BTD_Mod_Helper.Extensions.PetModelBehaviorExt.RemoveBehavior_T_(thisPetModel,T).T 'BTD_Mod_Helper.Extensions.PetModelBehaviorExt.RemoveBehavior(this PetModel, T).T') -Removes a specific behavior from a tower + + +## PetModelBehaviorExt.RemoveBehavior(this PetModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this PetModel model, T behavior) +public static void RemoveBehavior(this PetModel model) where T : Model; ``` #### Type parameters - + `T` + +The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Pets.PetModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Pets.PetModel 'Il2CppAssets.Scripts.Models.Towers.Pets.PetModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.PetModelBehaviorExt.md#BTD_Mod_Helper.Extensions.PetModelBehaviorExt.RemoveBehavior_T_(thisPetModel,T).T 'BTD_Mod_Helper.Extensions.PetModelBehaviorExt.RemoveBehavior(this PetModel, T).T') - ## PetModelBehaviorExt.RemoveBehaviors(this PetModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.md index e1543ee13..c1e5b3f18 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.md @@ -115,54 +115,54 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## PowerModelBehaviorExt.RemoveBehavior(this PowerModel) Method +## PowerModelBehaviorExt.RemoveBehavior(this PowerModel, T) Method -Remove the first Behavior of Type T +Removes a specific behavior from a tower ```csharp -public static void RemoveBehavior(this PowerModel model) +public static void RemoveBehavior(this PowerModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` - -The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Powers.PowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Powers.PowerModel 'Il2CppAssets.Scripts.Models.Powers.PowerModel') - + -## PowerModelBehaviorExt.RemoveBehavior(this PowerModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.md#BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.RemoveBehavior_T_(thisPowerModel,T).T 'BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.RemoveBehavior(this PowerModel, T).T') -Removes a specific behavior from a tower + + +## PowerModelBehaviorExt.RemoveBehavior(this PowerModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this PowerModel model, T behavior) +public static void RemoveBehavior(this PowerModel model) where T : Model; ``` #### Type parameters - + `T` + +The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Powers.PowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Powers.PowerModel 'Il2CppAssets.Scripts.Models.Powers.PowerModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.md#BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.RemoveBehavior_T_(thisPowerModel,T).T 'BTD_Mod_Helper.Extensions.PowerModelBehaviorExt.RemoveBehavior(this PowerModel, T).T') - ## PowerModelBehaviorExt.RemoveBehaviors(this PowerModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.ProfileModelExt.md b/Documentation/BTD_Mod_Helper.Extensions.ProfileModelExt.md index d6cac35e4..788d27313 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.ProfileModelExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.ProfileModelExt.md @@ -12,27 +12,6 @@ public static class ProfileModelExt Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ProfileModelExt ### Methods - - -## ProfileModelExt.UnlockTower(this ProfileModel, string) Method - -Add a tower to the list of UnlockedTowers - -```csharp -public static void UnlockTower(this ProfileModel profileModel, string towerId); -``` -#### Parameters - - - -`profileModel` [Il2CppAssets.Scripts.Models.Profile.ProfileModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Profile.ProfileModel 'Il2CppAssets.Scripts.Models.Profile.ProfileModel') - - - -`towerId` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - -The ID of the tower you want to unlock - ## ProfileModelExt.UnlockTower(this ProfileModel, string, bool) Method @@ -63,4 +42,25 @@ the game #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') -Returns whether or not the tower was unlocked \ No newline at end of file +Returns whether or not the tower was unlocked + + + +## ProfileModelExt.UnlockTower(this ProfileModel, string) Method + +Add a tower to the list of UnlockedTowers + +```csharp +public static void UnlockTower(this ProfileModel profileModel, string towerId); +``` +#### Parameters + + + +`profileModel` [Il2CppAssets.Scripts.Models.Profile.ProfileModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Profile.ProfileModel 'Il2CppAssets.Scripts.Models.Profile.ProfileModel') + + + +`towerId` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +The ID of the tower you want to unlock \ No newline at end of file diff --git a/Documentation/BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.md index 75d64bb8c..a4ab450cd 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.md @@ -109,52 +109,52 @@ public static bool HasProjectileBehavior(this Projectile projectile) #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## ProjectileBehaviorExt.RemoveProjectileBehavior(this Projectile) Method +## ProjectileBehaviorExt.RemoveProjectileBehavior(this Projectile, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveProjectileBehavior(this Projectile projectile) +public static void RemoveProjectileBehavior(this Projectile projectile, T behavior) where T : ProjectileBehavior; ``` #### Type parameters - + `T` #### Parameters - + `projectile` [Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Projectile](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Projectile 'Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Projectile') - + -## ProjectileBehaviorExt.RemoveProjectileBehavior(this Projectile, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.md#BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.RemoveProjectileBehavior_T_(thisProjectile,T).T 'BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.RemoveProjectileBehavior(this Projectile, T).T') -Remove the first Behavior of type T + + +## ProjectileBehaviorExt.RemoveProjectileBehavior(this Projectile) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveProjectileBehavior(this Projectile projectile, T behavior) +public static void RemoveProjectileBehavior(this Projectile projectile) where T : ProjectileBehavior; ``` #### Type parameters - + `T` #### Parameters - + `projectile` [Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Projectile](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Projectile 'Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Projectile') - - -`behavior` [T](BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.md#BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.RemoveProjectileBehavior_T_(thisProjectile,T).T 'BTD_Mod_Helper.Extensions.ProjectileBehaviorExt.RemoveProjectileBehavior(this Projectile, T).T') - ## ProjectileBehaviorExt.RemoveProjectileBehaviors(this Projectile) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.md index 7f8384583..733ebea37 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.md @@ -91,112 +91,112 @@ The Behavior you want #### Returns [System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[T](BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.md#BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.GetBehaviors_T_(thisProjectileModel).T 'BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.GetBehaviors(this ProjectileModel).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') - + -## ProjectileModelBehaviorExt.HasBehavior(this ProjectileModel) Method +## ProjectileModelBehaviorExt.HasBehavior(this ProjectileModel, T) Method Check if this has a specific Behavior ```csharp -public static bool HasBehavior(this ProjectileModel model) +public static bool HasBehavior(this ProjectileModel model, out T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you're checking for #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel 'Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel') + + +`behavior` [T](BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.md#BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.HasBehavior_T_(thisProjectileModel,T).T 'BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.HasBehavior(this ProjectileModel, T).T') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## ProjectileModelBehaviorExt.HasBehavior(this ProjectileModel, T) Method +## ProjectileModelBehaviorExt.HasBehavior(this ProjectileModel) Method Check if this has a specific Behavior ```csharp -public static bool HasBehavior(this ProjectileModel model, out T behavior) +public static bool HasBehavior(this ProjectileModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you're checking for #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel 'Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.md#BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.HasBehavior_T_(thisProjectileModel,T).T 'BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.HasBehavior(this ProjectileModel, T).T') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel) Method +## ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveBehavior(this ProjectileModel model) +public static void RemoveBehavior(this ProjectileModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel 'Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel') - + -## ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.md#BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.RemoveBehavior_T_(thisProjectileModel,T).T 'BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel, T).T') -Remove the first Behavior of type T + + +## ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this ProjectileModel model, T behavior) +public static void RemoveBehavior(this ProjectileModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel 'Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.md#BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.RemoveBehavior_T_(thisProjectileModel,T).T 'BTD_Mod_Helper.Extensions.ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel, T).T') - ## ProjectileModelBehaviorExt.RemoveBehaviors(this ProjectileModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.RoundModelExt.md b/Documentation/BTD_Mod_Helper.Extensions.RoundModelExt.md index 345dcece4..d03916387 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.RoundModelExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.RoundModelExt.md @@ -109,48 +109,48 @@ public static void ClearBloonGroups(this RoundModel roundModel); `roundModel` [Il2CppAssets.Scripts.Models.Rounds.RoundModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Rounds.RoundModel 'Il2CppAssets.Scripts.Models.Rounds.RoundModel') - + -## RoundModelExt.RemoveBloonGroup(this RoundModel, string) Method +## RoundModelExt.RemoveBloonGroup(this RoundModel, string, int) Method -Removes all Bloon Groups where the id is as specified +Removes the index'th Bloon Group where the id is as specified ```csharp -public static void RemoveBloonGroup(this RoundModel roundModel, string bloonId); +public static void RemoveBloonGroup(this RoundModel roundModel, string bloonId, int index); ``` #### Parameters - + `roundModel` [Il2CppAssets.Scripts.Models.Rounds.RoundModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Rounds.RoundModel 'Il2CppAssets.Scripts.Models.Rounds.RoundModel') - + `bloonId` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - + -## RoundModelExt.RemoveBloonGroup(this RoundModel, string, int) Method +`index` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') -Removes the index'th Bloon Group where the id is as specified + + +## RoundModelExt.RemoveBloonGroup(this RoundModel, string) Method + +Removes all Bloon Groups where the id is as specified ```csharp -public static void RemoveBloonGroup(this RoundModel roundModel, string bloonId, int index); +public static void RemoveBloonGroup(this RoundModel roundModel, string bloonId); ``` #### Parameters - + `roundModel` [Il2CppAssets.Scripts.Models.Rounds.RoundModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Rounds.RoundModel 'Il2CppAssets.Scripts.Models.Rounds.RoundModel') - + `bloonId` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - - -`index` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - ## RoundModelExt.ReplaceBloonInGroups(this RoundModel, string, string, bool) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.Texture2DExt.md b/Documentation/BTD_Mod_Helper.Extensions.Texture2DExt.md index f47a7d96a..dff555cc4 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.Texture2DExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.Texture2DExt.md @@ -36,55 +36,55 @@ Color to make new texture #### Returns [UnityEngine.Texture2D](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Texture2D 'UnityEngine.Texture2D') - + -## Texture2DExt.CreateSpriteFromTexture(this Texture2D, float) Method +## Texture2DExt.CreateSpriteFromTexture(this Texture2D, float, Vector2) Method Create a Sprite from this Texture2D ```csharp -public static Sprite CreateSpriteFromTexture(this Texture2D texture2D, float pixelsPerUnit); +public static Sprite CreateSpriteFromTexture(this Texture2D texture2D, float pixelsPerUnit, Vector2 pivot); ``` #### Parameters - + `texture2D` [UnityEngine.Texture2D](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Texture2D 'UnityEngine.Texture2D') - + `pixelsPerUnit` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') Number of pixels you want in each unit. More pixels means bigger sprite in game + + +`pivot` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') + #### Returns [UnityEngine.Sprite](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Sprite 'UnityEngine.Sprite') - + -## Texture2DExt.CreateSpriteFromTexture(this Texture2D, float, Vector2) Method +## Texture2DExt.CreateSpriteFromTexture(this Texture2D, float) Method Create a Sprite from this Texture2D ```csharp -public static Sprite CreateSpriteFromTexture(this Texture2D texture2D, float pixelsPerUnit, Vector2 pivot); +public static Sprite CreateSpriteFromTexture(this Texture2D texture2D, float pixelsPerUnit); ``` #### Parameters - + `texture2D` [UnityEngine.Texture2D](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Texture2D 'UnityEngine.Texture2D') - + `pixelsPerUnit` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single') Number of pixels you want in each unit. More pixels means bigger sprite in game - - -`pivot` [UnityEngine.Vector2](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Vector2 'UnityEngine.Vector2') - #### Returns [UnityEngine.Sprite](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Sprite 'UnityEngine.Sprite') diff --git a/Documentation/BTD_Mod_Helper.Extensions.TowerBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.TowerBehaviorExt.md index 27c320fa6..4ee5a5978 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.TowerBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.TowerBehaviorExt.md @@ -109,52 +109,52 @@ public static bool HasTowerBehavior(this Tower tower) #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## TowerBehaviorExt.RemoveTowerBehavior(this Tower) Method +## TowerBehaviorExt.RemoveTowerBehavior(this Tower, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveTowerBehavior(this Tower tower) +public static void RemoveTowerBehavior(this Tower tower, T behavior) where T : TowerBehavior; ``` #### Type parameters - + `T` #### Parameters - + `tower` [Il2CppAssets.Scripts.Simulation.Towers.Tower](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Towers.Tower 'Il2CppAssets.Scripts.Simulation.Towers.Tower') - + -## TowerBehaviorExt.RemoveTowerBehavior(this Tower, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.TowerBehaviorExt.md#BTD_Mod_Helper.Extensions.TowerBehaviorExt.RemoveTowerBehavior_T_(thisTower,T).T 'BTD_Mod_Helper.Extensions.TowerBehaviorExt.RemoveTowerBehavior(this Tower, T).T') -Remove the first Behavior of type T + + +## TowerBehaviorExt.RemoveTowerBehavior(this Tower) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveTowerBehavior(this Tower tower, T behavior) +public static void RemoveTowerBehavior(this Tower tower) where T : TowerBehavior; ``` #### Type parameters - + `T` #### Parameters - + `tower` [Il2CppAssets.Scripts.Simulation.Towers.Tower](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Towers.Tower 'Il2CppAssets.Scripts.Simulation.Towers.Tower') - - -`behavior` [T](BTD_Mod_Helper.Extensions.TowerBehaviorExt.md#BTD_Mod_Helper.Extensions.TowerBehaviorExt.RemoveTowerBehavior_T_(thisTower,T).T 'BTD_Mod_Helper.Extensions.TowerBehaviorExt.RemoveTowerBehavior(this Tower, T).T') - ## TowerBehaviorExt.RemoveTowerBehaviors(this Tower) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.md index 2d5951752..d8506f799 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.md @@ -110,112 +110,112 @@ The Behavior you want #### Returns [System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[T](BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.md#BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.GetBehaviors_T_(thisTowerModel).T 'BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.GetBehaviors(this TowerModel).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') - + -## TowerModelBehaviorExt.HasBehavior(this TowerModel) Method +## TowerModelBehaviorExt.HasBehavior(this TowerModel, T) Method Check if this has a specific Behavior ```csharp -public static bool HasBehavior(this TowerModel model) +public static bool HasBehavior(this TowerModel model, out T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you're checking for #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') + + +`behavior` [T](BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.md#BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.HasBehavior_T_(thisTowerModel,T).T 'BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.HasBehavior(this TowerModel, T).T') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## TowerModelBehaviorExt.HasBehavior(this TowerModel, T) Method +## TowerModelBehaviorExt.HasBehavior(this TowerModel) Method Check if this has a specific Behavior ```csharp -public static bool HasBehavior(this TowerModel model, out T behavior) +public static bool HasBehavior(this TowerModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you're checking for #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.md#BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.HasBehavior_T_(thisTowerModel,T).T 'BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.HasBehavior(this TowerModel, T).T') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## TowerModelBehaviorExt.RemoveBehavior(this TowerModel) Method +## TowerModelBehaviorExt.RemoveBehavior(this TowerModel, T) Method -Remove the first Behavior of Type T +Removes a specific behavior from a tower ```csharp -public static void RemoveBehavior(this TowerModel model) +public static void RemoveBehavior(this TowerModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') - + -## TowerModelBehaviorExt.RemoveBehavior(this TowerModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.md#BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.RemoveBehavior_T_(thisTowerModel,T).T 'BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.RemoveBehavior(this TowerModel, T).T') -Removes a specific behavior from a tower + + +## TowerModelBehaviorExt.RemoveBehavior(this TowerModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this TowerModel model, T behavior) +public static void RemoveBehavior(this TowerModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.md#BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.RemoveBehavior_T_(thisTowerModel,T).T 'BTD_Mod_Helper.Extensions.TowerModelBehaviorExt.RemoveBehavior(this TowerModel, T).T') - ## TowerModelBehaviorExt.RemoveBehaviors(this TowerModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.TowerModelExt.md b/Documentation/BTD_Mod_Helper.Extensions.TowerModelExt.md index 47b242ba9..aaa47b6ad 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.TowerModelExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.TowerModelExt.md @@ -12,21 +12,6 @@ public static class TowerModelExt Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 TowerModelExt ### Methods - - -## TowerModelExt.AddTiersToName(this TowerModel) Method - -Format's the tower's name with its tiers - -```csharp -public static void AddTiersToName(this TowerModel towerModel); -``` -#### Parameters - - - -`towerModel` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') - ## TowerModelExt.AddTiersToName(this TowerModel, int, int, int) Method @@ -54,6 +39,21 @@ public static void AddTiersToName(this TowerModel towerModel, int tier1, int tie `tier3` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + +## TowerModelExt.AddTiersToName(this TowerModel) Method + +Format's the tower's name with its tiers + +```csharp +public static void AddTiersToName(this TowerModel towerModel); +``` +#### Parameters + + + +`towerModel` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') + ## TowerModelExt.ApplyDisplay(this TowerModel) Method @@ -95,24 +95,6 @@ public static System.Collections.Generic.List GetAbilities(this To #### Returns [System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') - - -## TowerModelExt.GetAbility(this TowerModel) Method - -Return the first ability on the tower - -```csharp -public static AbilityModel GetAbility(this TowerModel towerModel); -``` -#### Parameters - - - -`towerModel` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') - -#### Returns -[Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel') - ## TowerModelExt.GetAbility(this TowerModel, int) Method @@ -139,59 +121,59 @@ Index of the ability you want. #### Returns [Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel') - + -## TowerModelExt.GetAllTowerToSim(this TowerModel) Method +## TowerModelExt.GetAbility(this TowerModel) Method -Return all TowerToSimulations with this TowerModel +Return the first ability on the tower ```csharp -public static System.Collections.Generic.List GetAllTowerToSim(this TowerModel towerModel); +public static AbilityModel GetAbility(this TowerModel towerModel); ``` #### Parameters - + `towerModel` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') #### Returns -[System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[Il2CppAssets.Scripts.Unity.Bridge.TowerToSimulation](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Bridge.TowerToSimulation 'Il2CppAssets.Scripts.Unity.Bridge.TowerToSimulation')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') +[Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel') - + -## TowerModelExt.GetAppliedUpgrades(this TowerModel) Method +## TowerModelExt.GetAllTowerToSim(this TowerModel) Method -Return all UpgradeModels that are currently applied to this TowerModel +Return all TowerToSimulations with this TowerModel ```csharp -public static System.Collections.Generic.List GetAppliedUpgrades(this TowerModel towerModel); +public static System.Collections.Generic.List GetAllTowerToSim(this TowerModel towerModel); ``` #### Parameters - + `towerModel` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') #### Returns -[System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel 'Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') +[System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[Il2CppAssets.Scripts.Unity.Bridge.TowerToSimulation](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Bridge.TowerToSimulation 'Il2CppAssets.Scripts.Unity.Bridge.TowerToSimulation')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') - + -## TowerModelExt.GetAttackModel(this TowerModel) Method +## TowerModelExt.GetAppliedUpgrades(this TowerModel) Method -Return the first AttackModel from this TowerModel, if it has one +Return all UpgradeModels that are currently applied to this TowerModel ```csharp -public static AttackModel GetAttackModel(this TowerModel towerModel); +public static System.Collections.Generic.List GetAppliedUpgrades(this TowerModel towerModel); ``` #### Parameters - + `towerModel` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') #### Returns -[Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel') +[System.Collections.Generic.List<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1')[Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel 'Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.List-1 'System.Collections.Generic.List`1') @@ -241,6 +223,24 @@ public static AttackModel GetAttackModel(this TowerModel towerModel, string name #### Returns [Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel') + + +## TowerModelExt.GetAttackModel(this TowerModel) Method + +Return the first AttackModel from this TowerModel, if it has one + +```csharp +public static AttackModel GetAttackModel(this TowerModel towerModel); +``` +#### Parameters + + + +`towerModel` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') + +#### Returns +[Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel 'Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel') + ## TowerModelExt.GetAttackModels(this TowerModel) Method @@ -483,24 +483,6 @@ What tier of upgrade is currently applied to tower #### Returns [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - - -## TowerModelExt.GetWeapon(this TowerModel) Method - -Return the first WeaponModel this TowerModel has, if it has one. - -```csharp -public static WeaponModel GetWeapon(this TowerModel towerModel); -``` -#### Parameters - - - -`towerModel` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') - -#### Returns -[Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel 'Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel') - ## TowerModelExt.GetWeapon(this TowerModel, int) Method @@ -527,6 +509,24 @@ Index of WeaponModel that you want #### Returns [Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel 'Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel') + + +## TowerModelExt.GetWeapon(this TowerModel) Method + +Return the first WeaponModel this TowerModel has, if it has one. + +```csharp +public static WeaponModel GetWeapon(this TowerModel towerModel); +``` +#### Parameters + + + +`towerModel` [Il2CppAssets.Scripts.Models.Towers.TowerModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.TowerModel 'Il2CppAssets.Scripts.Models.Towers.TowerModel') + +#### Returns +[Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel 'Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel') + ## TowerModelExt.GetWeapons(this TowerModel) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.WeaponBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.WeaponBehaviorExt.md index 1aa5c45d9..bc277e7d5 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.WeaponBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.WeaponBehaviorExt.md @@ -117,56 +117,56 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## WeaponBehaviorExt.RemoveWeaponBehavior(this Weapon) Method +## WeaponBehaviorExt.RemoveWeaponBehavior(this Weapon, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveWeaponBehavior(this Weapon weapon) +public static void RemoveWeaponBehavior(this Weapon weapon, T behavior) where T : WeaponBehavior; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `weapon` [Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon 'Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon') - + -## WeaponBehaviorExt.RemoveWeaponBehavior(this Weapon, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.WeaponBehaviorExt.md#BTD_Mod_Helper.Extensions.WeaponBehaviorExt.RemoveWeaponBehavior_T_(thisWeapon,T).T 'BTD_Mod_Helper.Extensions.WeaponBehaviorExt.RemoveWeaponBehavior(this Weapon, T).T') -Remove the first Behavior of type T + + +## WeaponBehaviorExt.RemoveWeaponBehavior(this Weapon) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveWeaponBehavior(this Weapon weapon, T behavior) +public static void RemoveWeaponBehavior(this Weapon weapon) where T : WeaponBehavior; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `weapon` [Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon 'Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon') - - -`behavior` [T](BTD_Mod_Helper.Extensions.WeaponBehaviorExt.md#BTD_Mod_Helper.Extensions.WeaponBehaviorExt.RemoveWeaponBehavior_T_(thisWeapon,T).T 'BTD_Mod_Helper.Extensions.WeaponBehaviorExt.RemoveWeaponBehavior(this Weapon, T).T') - ## WeaponBehaviorExt.RemoveWeaponBehaviors(this Weapon) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.md b/Documentation/BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.md index dcbf8c9b7..04368ac51 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.md @@ -117,56 +117,56 @@ The Behavior you're checking for #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel) Method +## WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel, T) Method -Remove the first Behavior of Type T +Remove the first Behavior of type T ```csharp -public static void RemoveBehavior(this WeaponModel model) +public static void RemoveBehavior(this WeaponModel model, T behavior) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel 'Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel') - + -## WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel, T) Method +`behavior` [T](BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.md#BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.RemoveBehavior_T_(thisWeaponModel,T).T 'BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel, T).T') -Remove the first Behavior of type T + + +## WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel) Method + +Remove the first Behavior of Type T ```csharp -public static void RemoveBehavior(this WeaponModel model, T behavior) +public static void RemoveBehavior(this WeaponModel model) where T : Model; ``` #### Type parameters - + `T` The Behavior you want to remove #### Parameters - + `model` [Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel 'Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel') - - -`behavior` [T](BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.md#BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.RemoveBehavior_T_(thisWeaponModel,T).T 'BTD_Mod_Helper.Extensions.WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel, T).T') - ## WeaponModelBehaviorExt.RemoveBehaviors(this WeaponModel) Method diff --git a/Documentation/BTD_Mod_Helper.ModHelper.md b/Documentation/BTD_Mod_Helper.ModHelper.md index 9af80f605..b3e6688ab 100644 --- a/Documentation/BTD_Mod_Helper.ModHelper.md +++ b/Documentation/BTD_Mod_Helper.ModHelper.md @@ -165,43 +165,43 @@ public static T GetMod() #### Returns [T](BTD_Mod_Helper.ModHelper.md#BTD_Mod_Helper.ModHelper.GetMod_T_().T 'BTD_Mod_Helper.ModHelper.GetMod().T') - + -## ModHelper.HasMod(string) Method +## ModHelper.HasMod(string, BloonsMod) Method -Returns whether a mod with the given name is installed +Returns whether a mod with the given name is installed, and pass it to the out param if it is ```csharp -public static bool HasMod(string name); +public static bool HasMod(string name, out BTD_Mod_Helper.BloonsMod bloonsMod); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + +`bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod') + #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - + -## ModHelper.HasMod(string, BloonsMod) Method +## ModHelper.HasMod(string) Method -Returns whether a mod with the given name is installed, and pass it to the out param if it is +Returns whether a mod with the given name is installed ```csharp -public static bool HasMod(string name, out BTD_Mod_Helper.BloonsMod bloonsMod); +public static bool HasMod(string name); ``` #### Parameters - + `name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - - -`bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod') - #### Returns [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') diff --git a/README.md b/README.md index 26d2b7085..fd2b0ab29 100644 --- a/README.md +++ b/README.md @@ -93,4 +93,4 @@ Others who have made notable suggestions/contributions include but are not limit Mod Helper contributors are most active on the [BTD6 Mods & Discussion Discord Server](https://discord.gg/NnD6nRH). -Discord names gurrenm4#2395 and doombubbles#1701 +Discord names `gurrenm4` and `doombubbles` \ No newline at end of file