diff --git a/Content/Throwables/Test.uasset b/Content/Throwables/Test.uasset new file mode 100644 index 0000000..2f01880 --- /dev/null +++ b/Content/Throwables/Test.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a2e1ef6001a9f7754f4e4c2247a1329b69d4e8faf9f4f3e7869fa3ae2def662 +size 33326 diff --git a/Content/Throwables/Throww.uasset b/Content/Throwables/Throww.uasset new file mode 100644 index 0000000..d03b184 --- /dev/null +++ b/Content/Throwables/Throww.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf40fa44a7e7e39170f7ef44fbb3f7f22102615b1bdf786d6b7a0efe5d9e6dd1 +size 33453 diff --git a/Content/Throwables/reee.uasset b/Content/Throwables/reee.uasset new file mode 100644 index 0000000..1ae1c01 --- /dev/null +++ b/Content/Throwables/reee.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:004c092abc53e28758e8be708a14b16601f6eb5948a403d59cbda422f0e584dd +size 33330 diff --git a/Source/Nakatomi/NakatomiCharacter.cpp b/Source/Nakatomi/NakatomiCharacter.cpp index 0824d72..9c2afdd 100644 --- a/Source/Nakatomi/NakatomiCharacter.cpp +++ b/Source/Nakatomi/NakatomiCharacter.cpp @@ -214,7 +214,7 @@ void ANakatomiCharacter::OnFire() OnFired.ExecuteIfBound(); } -AThrowable* ANakatomiCharacter::PopThrowableFromInventory() +TSubclassOf ANakatomiCharacter::PopThrowableFromInventory() { if (ThrowableInventory.Num() > 0) { @@ -224,7 +224,7 @@ AThrowable* ANakatomiCharacter::PopThrowableFromInventory() return {}; } -void ANakatomiCharacter::PushThrowableToInventory(AThrowable* Throwable) +void ANakatomiCharacter::PushThrowableToInventory(TSubclassOf Throwable) { if (ThrowableInventory.Num() < MaximumThrowableInventorySize) { diff --git a/Source/Nakatomi/NakatomiCharacter.h b/Source/Nakatomi/NakatomiCharacter.h index 22e9498..0c368f1 100644 --- a/Source/Nakatomi/NakatomiCharacter.h +++ b/Source/Nakatomi/NakatomiCharacter.h @@ -35,8 +35,8 @@ public: UPROPERTY() AWeapon* CurrentWeapon = nullptr; - UPROPERTY() - TArray ThrowableInventory; + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) + TArray> ThrowableInventory; private: UPROPERTY(VisibleDefaultsOnly) @@ -94,9 +94,9 @@ public: virtual void OnFire(); - AThrowable* PopThrowableFromInventory(); + TSubclassOf PopThrowableFromInventory(); - void PushThrowableToInventory(AThrowable* Throwable); + void PushThrowableToInventory(TSubclassOf Throwable); protected: virtual void CalculateHits(TArray* hits);