From 2cdd70c50720888f96a0bec34ccd76978cd4ad17 Mon Sep 17 00:00:00 2001 From: PHILIP WHITE Date: Sat, 27 Jan 2024 11:09:42 +0000 Subject: [PATCH] Update John for Helicopter Animation --- SeagullGame/Content/Items/BPI_Cube.uasset | 4 ++-- SeagullGame/Content/John/BP_John.uasset | 3 +++ SeagullGame/Content/John/Helicopter.uasset | 3 +++ .../TopDownMap/0/QV/V2R39KTDCZ9SA6YKIG357Q.uasset | 3 +++ .../TopDownMap/6/25/Y3O5AZUCBRGIK0G1642MVL.uasset | 2 +- .../TopDownMap/A/4W/BK95DJBD0PIVE7JMNNMPSX.uasset | 2 +- .../TopDownMap/D/UT/0GXQ9ZBIC5NL8RGOUWREW0.uasset | 3 +++ SeagullGame/Source/SeagullGame/ItemActor.h | 12 ++++++++++++ .../Source/SeagullGame/SeagullGameCharacter.cpp | 3 ++- .../Source/SeagullGame/SeagullGameCharacter.h | 8 +++++--- 10 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 SeagullGame/Content/John/BP_John.uasset create mode 100644 SeagullGame/Content/John/Helicopter.uasset create mode 100644 SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/0/QV/V2R39KTDCZ9SA6YKIG357Q.uasset create mode 100644 SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/D/UT/0GXQ9ZBIC5NL8RGOUWREW0.uasset diff --git a/SeagullGame/Content/Items/BPI_Cube.uasset b/SeagullGame/Content/Items/BPI_Cube.uasset index 7306b4a..de700c0 100644 --- a/SeagullGame/Content/Items/BPI_Cube.uasset +++ b/SeagullGame/Content/Items/BPI_Cube.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9743f6832cc2577d9ca8fc8ef165ce067ea9e22845cf7a7805a0c6201b3865a6 -size 27709 +oid sha256:57c513a0f3ec29d6b841aed09102067d465918d7a381aa84843f0804882003a9 +size 27696 diff --git a/SeagullGame/Content/John/BP_John.uasset b/SeagullGame/Content/John/BP_John.uasset new file mode 100644 index 0000000..cc9df5a --- /dev/null +++ b/SeagullGame/Content/John/BP_John.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0c43415c14caacfc4b8f79a9aa6536f55d4ad9149384df660d2a4d5b7cf997d +size 162405 diff --git a/SeagullGame/Content/John/Helicopter.uasset b/SeagullGame/Content/John/Helicopter.uasset new file mode 100644 index 0000000..01b5775 --- /dev/null +++ b/SeagullGame/Content/John/Helicopter.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53d78d80a12565fdcb80cbec8cf409120ce792469f9707c2dcaf73c916300378 +size 1872 diff --git a/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/0/QV/V2R39KTDCZ9SA6YKIG357Q.uasset b/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/0/QV/V2R39KTDCZ9SA6YKIG357Q.uasset new file mode 100644 index 0000000..d6c5f32 --- /dev/null +++ b/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/0/QV/V2R39KTDCZ9SA6YKIG357Q.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:101b3af9f3413376e629a4c69310042d8a6f519a6f982423d0338d4a7d28c5cd +size 7384 diff --git a/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/6/25/Y3O5AZUCBRGIK0G1642MVL.uasset b/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/6/25/Y3O5AZUCBRGIK0G1642MVL.uasset index 277c33d..6020fc0 100644 --- a/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/6/25/Y3O5AZUCBRGIK0G1642MVL.uasset +++ b/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/6/25/Y3O5AZUCBRGIK0G1642MVL.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd144e23ae7b933cf9eff09eaf7b5f2181bf292d4579270add967b06b711eb30 +oid sha256:e694ab73fdea502be8b05cd5ea26b7cf8bbcf7aaa6cc3e5f4741f09d7e6d893c size 4240 diff --git a/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/A/4W/BK95DJBD0PIVE7JMNNMPSX.uasset b/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/A/4W/BK95DJBD0PIVE7JMNNMPSX.uasset index b8457de..25dfa20 100644 --- a/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/A/4W/BK95DJBD0PIVE7JMNNMPSX.uasset +++ b/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/A/4W/BK95DJBD0PIVE7JMNNMPSX.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:019f700bf722c12cb9b7a815736d7c917ee73aa2a0cc097753a2caca09888b6b +oid sha256:724bd227a5de2a9ad96dc5d00d82ebdaa84e5fb98f3c7a560605c07b167ed2af size 4242 diff --git a/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/D/UT/0GXQ9ZBIC5NL8RGOUWREW0.uasset b/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/D/UT/0GXQ9ZBIC5NL8RGOUWREW0.uasset new file mode 100644 index 0000000..e2735ac --- /dev/null +++ b/SeagullGame/Content/__ExternalActors__/TopDown/Maps/TopDownMap/D/UT/0GXQ9ZBIC5NL8RGOUWREW0.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:965eff415e91bce941122199b9c05fe2a19d3edc1573b3ac7464eeff557df5d1 +size 7384 diff --git a/SeagullGame/Source/SeagullGame/ItemActor.h b/SeagullGame/Source/SeagullGame/ItemActor.h index dde13c7..4040178 100644 --- a/SeagullGame/Source/SeagullGame/ItemActor.h +++ b/SeagullGame/Source/SeagullGame/ItemActor.h @@ -6,6 +6,14 @@ #include "GameFramework/Actor.h" #include "ItemActor.generated.h" +UENUM(BlueprintType) +enum class EItemType : uint8 +{ + Cube UMETA(DisplayName = "Cube"), + Apple UMETA(DisplayName = "Apple"), + Banana UMETA(DisplayName = "Banana"), +}; + UCLASS() class SEAGULLGAME_API AItemActor : public AActor { @@ -17,6 +25,10 @@ public: UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Item") TSubclassOf ItemNoPhysics; + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Item") + float HungerValue = 10; + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Item") + EItemType ItemType; protected: // Called when the game starts or when spawned diff --git a/SeagullGame/Source/SeagullGame/SeagullGameCharacter.cpp b/SeagullGame/Source/SeagullGame/SeagullGameCharacter.cpp index 31529d4..7d45aa0 100644 --- a/SeagullGame/Source/SeagullGame/SeagullGameCharacter.cpp +++ b/SeagullGame/Source/SeagullGame/SeagullGameCharacter.cpp @@ -188,9 +188,10 @@ void ASeagullGameCharacter::OnPickupBoxEndOverlap(UPrimitiveComponent* Overlappe } } -void ASeagullGameCharacter::IncreaseJohnsHunger(float HungerAmount) +void ASeagullGameCharacter::IncreaseJohnsHunger(const float HungerAmount) { JohnsCurrentHunger += HungerAmount; + Score += HungerAmount * 10; if (JohnsCurrentHunger > JohnsMaxHunger) { JohnsCurrentHunger = JohnsMaxHunger; diff --git a/SeagullGame/Source/SeagullGame/SeagullGameCharacter.h b/SeagullGame/Source/SeagullGame/SeagullGameCharacter.h index e2d8847..5de6a1b 100644 --- a/SeagullGame/Source/SeagullGame/SeagullGameCharacter.h +++ b/SeagullGame/Source/SeagullGame/SeagullGameCharacter.h @@ -98,15 +98,17 @@ public: AActor* ClosestItemActor; UPROPERTY(BlueprintReadOnly, Category = "Item") UBoxComponent* PickupBox; + UPROPERTY(BlueprintReadOnly, Category = "Item") + EItemType CurrentCraving; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John") float JohnsCurrentHunger = 0; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John") - float JohnsDefaultHunger = 100; + float JohnsDefaultHunger = 250; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John") - float JohnsMaxHunger = 200; + float JohnsMaxHunger = 500; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "John") - float JohnsHungerDeclineAmount = 10.f; + float JohnsHungerDeclineAmount = 1.f; UFUNCTION(BlueprintCallable, Category = "John") void IncreaseJohnsHunger(float HungerAmount);