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