From c8e66b431ff6783d337d3fe1e10e0df1eb87f8ff Mon Sep 17 00:00:00 2001 From: Ny Bruker <robinhs@stud.ntnu.no> Date: Fri, 9 Dec 2022 17:08:11 +0100 Subject: [PATCH] Fixed bug with Keys being null. --- .../Assets/Code/Core/Abilities/Base/AbilityEntity.cs | 3 +-- .../Code/Core/Abilities/Base/AbilityEntity.cs.meta | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs.meta diff --git a/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs b/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs index 0f766b06..474e5a34 100644 --- a/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs +++ b/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs @@ -42,10 +42,9 @@ namespace BigSock { public AbilityEntity(IAbility ability, int index, List<KeyCode> keys = null) { if(ability == null) throw new ArgumentNullException(nameof(ability)); - keys ??= new List<KeyCode>(); - Ability = ability; Index = index; + Keys = keys ?? new List<KeyCode>(); } } } diff --git a/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs.meta b/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs.meta new file mode 100644 index 00000000..96d01f0f --- /dev/null +++ b/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b5734a7700fbf65438b9e4f94e46e5ce +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: -- GitLab