Update John for Helicopter Animation
This commit is contained in:
parent
f08402f265
commit
2cdd70c507
BIN
SeagullGame/Content/Items/BPI_Cube.uasset
(Stored with Git LFS)
BIN
SeagullGame/Content/Items/BPI_Cube.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
SeagullGame/Content/John/BP_John.uasset
(Stored with Git LFS)
Normal file
BIN
SeagullGame/Content/John/BP_John.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
SeagullGame/Content/John/Helicopter.uasset
(Stored with Git LFS)
Normal file
BIN
SeagullGame/Content/John/Helicopter.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/0/QV/V2R39KTDCZ9SA6YKIG357Q.uasset
(Stored with Git LFS)
Normal file
BIN
SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/0/QV/V2R39KTDCZ9SA6YKIG357Q.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/6/25/Y3O5AZUCBRGIK0G1642MVL.uasset
(Stored with Git LFS)
BIN
SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/6/25/Y3O5AZUCBRGIK0G1642MVL.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/A/4W/BK95DJBD0PIVE7JMNNMPSX.uasset
(Stored with Git LFS)
BIN
SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/A/4W/BK95DJBD0PIVE7JMNNMPSX.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/D/UT/0GXQ9ZBIC5NL8RGOUWREW0.uasset
(Stored with Git LFS)
Normal file
BIN
SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/D/UT/0GXQ9ZBIC5NL8RGOUWREW0.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -6,6 +6,14 @@
|
|||||||
#include "GameFramework/Actor.h"
|
#include "GameFramework/Actor.h"
|
||||||
#include "ItemActor.generated.h"
|
#include "ItemActor.generated.h"
|
||||||
|
|
||||||
|
UENUM(BlueprintType)
|
||||||
|
enum class EItemType : uint8
|
||||||
|
{
|
||||||
|
Cube UMETA(DisplayName = "Cube"),
|
||||||
|
Apple UMETA(DisplayName = "Apple"),
|
||||||
|
Banana UMETA(DisplayName = "Banana"),
|
||||||
|
};
|
||||||
|
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class SEAGULLGAME_API AItemActor : public AActor
|
class SEAGULLGAME_API AItemActor : public AActor
|
||||||
{
|
{
|
||||||
@ -17,6 +25,10 @@ public:
|
|||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Item")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Item")
|
||||||
TSubclassOf<AItemActor> ItemNoPhysics;
|
TSubclassOf<AItemActor> ItemNoPhysics;
|
||||||
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Item")
|
||||||
|
float HungerValue = 10;
|
||||||
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Item")
|
||||||
|
EItemType ItemType;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Called when the game starts or when spawned
|
// Called when the game starts or when spawned
|
||||||
|
@ -188,9 +188,10 @@ void ASeagullGameCharacter::OnPickupBoxEndOverlap(UPrimitiveComponent* Overlappe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ASeagullGameCharacter::IncreaseJohnsHunger(float HungerAmount)
|
void ASeagullGameCharacter::IncreaseJohnsHunger(const float HungerAmount)
|
||||||
{
|
{
|
||||||
JohnsCurrentHunger += HungerAmount;
|
JohnsCurrentHunger += HungerAmount;
|
||||||
|
Score += HungerAmount * 10;
|
||||||
if (JohnsCurrentHunger > JohnsMaxHunger)
|
if (JohnsCurrentHunger > JohnsMaxHunger)
|
||||||
{
|
{
|
||||||
JohnsCurrentHunger = JohnsMaxHunger;
|
JohnsCurrentHunger = JohnsMaxHunger;
|
||||||
|
@ -98,15 +98,17 @@ public:
|
|||||||
AActor* ClosestItemActor;
|
AActor* ClosestItemActor;
|
||||||
UPROPERTY(BlueprintReadOnly, Category = "Item")
|
UPROPERTY(BlueprintReadOnly, Category = "Item")
|
||||||
UBoxComponent* PickupBox;
|
UBoxComponent* PickupBox;
|
||||||
|
UPROPERTY(BlueprintReadOnly, Category = "Item")
|
||||||
|
EItemType CurrentCraving;
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John")
|
||||||
float JohnsCurrentHunger = 0;
|
float JohnsCurrentHunger = 0;
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John")
|
||||||
float JohnsDefaultHunger = 100;
|
float JohnsDefaultHunger = 250;
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John")
|
||||||
float JohnsMaxHunger = 200;
|
float JohnsMaxHunger = 500;
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John")
|
||||||
float JohnsHungerDeclineAmount = 10.f;
|
float JohnsHungerDeclineAmount = 1.f;
|
||||||
UFUNCTION(BlueprintCallable, Category = "John")
|
UFUNCTION(BlueprintCallable, Category = "John")
|
||||||
void IncreaseJohnsHunger(float HungerAmount);
|
void IncreaseJohnsHunger(float HungerAmount);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user