Update ThrowableInventory type
This commit is contained in:
parent
7cdb9b1c69
commit
60bf490f8a
BIN
Content/Throwables/Test.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Throwables/Test.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Throwables/Throww.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Throwables/Throww.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Throwables/reee.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Throwables/reee.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -214,7 +214,7 @@ void ANakatomiCharacter::OnFire()
|
|||||||
OnFired.ExecuteIfBound();
|
OnFired.ExecuteIfBound();
|
||||||
}
|
}
|
||||||
|
|
||||||
AThrowable* ANakatomiCharacter::PopThrowableFromInventory()
|
TSubclassOf<AThrowable> ANakatomiCharacter::PopThrowableFromInventory()
|
||||||
{
|
{
|
||||||
if (ThrowableInventory.Num() > 0)
|
if (ThrowableInventory.Num() > 0)
|
||||||
{
|
{
|
||||||
@ -224,7 +224,7 @@ AThrowable* ANakatomiCharacter::PopThrowableFromInventory()
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANakatomiCharacter::PushThrowableToInventory(AThrowable* Throwable)
|
void ANakatomiCharacter::PushThrowableToInventory(TSubclassOf<AThrowable> Throwable)
|
||||||
{
|
{
|
||||||
if (ThrowableInventory.Num() < MaximumThrowableInventorySize)
|
if (ThrowableInventory.Num() < MaximumThrowableInventorySize)
|
||||||
{
|
{
|
||||||
|
@ -35,8 +35,8 @@ public:
|
|||||||
UPROPERTY()
|
UPROPERTY()
|
||||||
AWeapon* CurrentWeapon = nullptr;
|
AWeapon* CurrentWeapon = nullptr;
|
||||||
|
|
||||||
UPROPERTY()
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
||||||
TArray<AThrowable*> ThrowableInventory;
|
TArray<TSubclassOf<AThrowable>> ThrowableInventory;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(VisibleDefaultsOnly)
|
UPROPERTY(VisibleDefaultsOnly)
|
||||||
@ -94,9 +94,9 @@ public:
|
|||||||
|
|
||||||
virtual void OnFire();
|
virtual void OnFire();
|
||||||
|
|
||||||
AThrowable* PopThrowableFromInventory();
|
TSubclassOf<AThrowable> PopThrowableFromInventory();
|
||||||
|
|
||||||
void PushThrowableToInventory(AThrowable* Throwable);
|
void PushThrowableToInventory(TSubclassOf<AThrowable> Throwable);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void CalculateHits(TArray<FHitResult>* hits);
|
virtual void CalculateHits(TArray<FHitResult>* hits);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user