From c53b7c7988c610e58da415a685ee31bafec32b32 Mon Sep 17 00:00:00 2001 From: Rafal Swierczek Date: Sat, 28 Oct 2023 17:36:54 +0100 Subject: [PATCH] Updated Base Gadget Class to Include UI Info --- .../Checkpoints/BP_CQCRange.uasset | 3 - .../Checkpoints/BP_LongRange.uasset | 3 - .../CP_ElimTutorialTarget.uasset | 3 + .../CP_EnterBountySimulationFacility.uasset | 3 + .../CP_ExitBountySimulationFacility.uasset | 3 + .../Checkpoints/CP_CheckOutCQCRange.uasset | 3 - .../Checkpoints/CP_CheckOutLongRange.uasset | 3 - .../Checkpoints/CP_ElimTutorialTarget.uasset | 3 - .../CP_EnterBountySimulationFacility.uasset | 3 - .../CP_ExitBountySimulationFacility.uasset | 3 - .../FiringRanges/BP_CQCRange.uasset | 3 + .../FiringRanges/BP_LongRange.uasset | 3 + .../FiringRanges/CP_CheckOutCQCRange.uasset | 3 + .../FiringRanges/CP_CheckOutLongRange.uasset | 3 + .../GadgetTutorial/BP_GadgetTutorial.uasset | 3 + .../MB_TutorialFacility.uasset | 4 +- .../OverloadModule/CG_OverloadModule.uasset | 4 +- .../CombatGadgets/OverloadModule/OM_Icon.png | 3 + .../OverloadModule/OM_Icon.uasset | 3 + .../RingModule/RG_RingModule.uasset | 4 +- .../ReconGadgets/RingModule/RM_Icon.png | 3 + .../ReconGadgets/RingModule/RM_Icon.uasset | 3 + .../VisionLink/RG_VisionLink.uasset | 4 +- .../ReconGadgets/VisionLink/VL_Icon.png | 3 + .../ReconGadgets/VisionLink/VL_Icon.uasset | 3 + .../HDRI/HDRI_Epic_Courtyard_Daylight.uasset | 2 +- .../EndlessVendetta/GadgetSystem/GadgetBase.h | 25 +++++ .../GadgetTutorial/GadgetTutorialStation.cpp | 101 ++++++++++++++++++ .../GadgetTutorial/GadgetTutorialStation.h | 68 ++++++++++++ 29 files changed, 245 insertions(+), 30 deletions(-) delete mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BP_CQCRange.uasset delete mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BP_LongRange.uasset create mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_ElimTutorialTarget.uasset create mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_EnterBountySimulationFacility.uasset create mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_ExitBountySimulationFacility.uasset delete mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_CheckOutCQCRange.uasset delete mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_CheckOutLongRange.uasset delete mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_ElimTutorialTarget.uasset delete mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_EnterBountySimulationFacility.uasset delete mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_ExitBountySimulationFacility.uasset create mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/BP_CQCRange.uasset create mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/BP_LongRange.uasset create mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/CP_CheckOutCQCRange.uasset create mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/CP_CheckOutLongRange.uasset create mode 100644 EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/GadgetTutorial/BP_GadgetTutorial.uasset create mode 100644 EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/OM_Icon.png create mode 100644 EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/OM_Icon.uasset create mode 100644 EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RM_Icon.png create mode 100644 EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RM_Icon.uasset create mode 100644 EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/VL_Icon.png create mode 100644 EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/VL_Icon.uasset create mode 100644 EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.cpp create mode 100644 EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.h diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BP_CQCRange.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BP_CQCRange.uasset deleted file mode 100644 index 857b3740..00000000 --- a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BP_CQCRange.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11b576c026267200d7fd27692a546054b7374aca9f8f27c768a33463f121b517 -size 100970 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BP_LongRange.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BP_LongRange.uasset deleted file mode 100644 index 2f02371c..00000000 --- a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BP_LongRange.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6e36749adcb26155cc5778616c16725b1b07791a69e13d915c60637c0c298454 -size 112834 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_ElimTutorialTarget.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_ElimTutorialTarget.uasset new file mode 100644 index 00000000..5883a4f1 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_ElimTutorialTarget.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:727b8060f6720e1de8c6cc5aa95de4e3d2c18b4b6df469c5f1661679379f3054 +size 143152 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_EnterBountySimulationFacility.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_EnterBountySimulationFacility.uasset new file mode 100644 index 00000000..3521b8ff --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_EnterBountySimulationFacility.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae808ffd2860b39caf2e3f45d99a2c4f2a1132080068bc782f9a478883a00aa6 +size 73431 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_ExitBountySimulationFacility.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_ExitBountySimulationFacility.uasset new file mode 100644 index 00000000..478f5860 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/BountySimulation/CP_ExitBountySimulationFacility.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e7b67b89169f8856643fa54ad3ee70088d8e57278dda3eae8a67cebae80fc4d +size 49564 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_CheckOutCQCRange.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_CheckOutCQCRange.uasset deleted file mode 100644 index a9cc0e6f..00000000 --- a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_CheckOutCQCRange.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:43d7ee43bc719045255002dcc02a74860889783dcea8744b7268ca6e1a40ba11 -size 150538 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_CheckOutLongRange.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_CheckOutLongRange.uasset deleted file mode 100644 index eac101b5..00000000 --- a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_CheckOutLongRange.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5fab63c70404d783d490b959d5a59076b65e935ffb44fe9a90681236ba83efaa -size 157565 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_ElimTutorialTarget.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_ElimTutorialTarget.uasset deleted file mode 100644 index c8253e8c..00000000 --- a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_ElimTutorialTarget.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ffa702b546f8a0b423c1cd0620bcbc0716ce9da63658323d6c72c1d0075e1af7 -size 145032 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_EnterBountySimulationFacility.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_EnterBountySimulationFacility.uasset deleted file mode 100644 index 1e8d35f8..00000000 --- a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_EnterBountySimulationFacility.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:92908322c75ce1234362b21ada25476a28ee631859d30ad89df3ad654e205737 -size 77065 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_ExitBountySimulationFacility.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_ExitBountySimulationFacility.uasset deleted file mode 100644 index b341ac54..00000000 --- a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/CP_ExitBountySimulationFacility.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd59f86788932ea7c2a0b171debaff99a819b2d5f94276320b95c1a5825991a7 -size 52271 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/BP_CQCRange.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/BP_CQCRange.uasset new file mode 100644 index 00000000..942a2ae0 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/BP_CQCRange.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96f0a512c232f3f8d44a79dde7fd6da8d34a02581ac068f010f9ffdaf7bba755 +size 101077 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/BP_LongRange.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/BP_LongRange.uasset new file mode 100644 index 00000000..12a9aaa2 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/BP_LongRange.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8f3d90b13b51423a6cba2d48c8b722b3659b7a14f4bcb6ac730a20df8339b1a +size 112942 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/CP_CheckOutCQCRange.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/CP_CheckOutCQCRange.uasset new file mode 100644 index 00000000..7ea56986 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/CP_CheckOutCQCRange.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36ce86af4f5aea5d620295cd12b2ace3d2fe8cb3f79176981f904c77eb61294a +size 147943 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/CP_CheckOutLongRange.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/CP_CheckOutLongRange.uasset new file mode 100644 index 00000000..b63a939b --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/FiringRanges/CP_CheckOutLongRange.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:840b5c9edd522548cd3b4b52a3c8a4a90a18f452ef07db4c7de688e130745888 +size 156457 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/GadgetTutorial/BP_GadgetTutorial.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/GadgetTutorial/BP_GadgetTutorial.uasset new file mode 100644 index 00000000..4763481d --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/TutorialFacility/Checkpoints/GadgetTutorial/BP_GadgetTutorial.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ec223a4fa2f994a882c313b35e5f7f2314e2f8a974c0fcb16b0959c4509a8e9 +size 22424 diff --git a/EndlessVendetta/Content/BountySystem/TutorialFacility/MB_TutorialFacility.uasset b/EndlessVendetta/Content/BountySystem/TutorialFacility/MB_TutorialFacility.uasset index 65570157..338f7298 100644 --- a/EndlessVendetta/Content/BountySystem/TutorialFacility/MB_TutorialFacility.uasset +++ b/EndlessVendetta/Content/BountySystem/TutorialFacility/MB_TutorialFacility.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8214ccde8a67cce0be6384a7fc9023213826c75b0d455bde7d395b2b5c3c4be1 -size 15494 +oid sha256:c6aa4cb4c59963b7874f9a41cd74af7512b6895a4aa337d9440de85b32ce3adb +size 15541 diff --git a/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/CG_OverloadModule.uasset b/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/CG_OverloadModule.uasset index 918f8800..b6136e8d 100644 --- a/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/CG_OverloadModule.uasset +++ b/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/CG_OverloadModule.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54c29d51176ad4d6f3709487c680854c3f65197fd77c3fdf909aacebf0012925 -size 109955 +oid sha256:3986954492ecb336baf2a23fdc7005cffddb10af130b3f9af9a679f5c052b709 +size 110442 diff --git a/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/OM_Icon.png b/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/OM_Icon.png new file mode 100644 index 00000000..75c24735 --- /dev/null +++ b/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/OM_Icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5edf9d42aa5282afec2532e9e5998f185722431e0a28318194705b15b38dfd14 +size 225535 diff --git a/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/OM_Icon.uasset b/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/OM_Icon.uasset new file mode 100644 index 00000000..9f2d7e12 --- /dev/null +++ b/EndlessVendetta/Content/Gadgets/CombatGadgets/OverloadModule/OM_Icon.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f275cf27038f08969c74d019dc74731cd60776e4e9ce940a5ef083740934f7e8 +size 244041 diff --git a/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RG_RingModule.uasset b/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RG_RingModule.uasset index 0ed980f6..8f215cce 100644 --- a/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RG_RingModule.uasset +++ b/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RG_RingModule.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d874ac6c73fe2ee1d7f1024877b2f448df3daf631d5dafbf4e23804549fa652 -size 108456 +oid sha256:b412ab348368172b66065bc5a41820dd96efe68260518a5d47a63216b343c3ba +size 108251 diff --git a/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RM_Icon.png b/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RM_Icon.png new file mode 100644 index 00000000..b99788f0 --- /dev/null +++ b/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RM_Icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dbb36f50568ec3e11397930be8509d0e2132f0fbd1c67c235cb6539bb90736f +size 15138 diff --git a/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RM_Icon.uasset b/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RM_Icon.uasset new file mode 100644 index 00000000..e8226353 --- /dev/null +++ b/EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/RM_Icon.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31f38b67634e9abe78242aac142e76eafee10d6101d5189f13a941b1a9bffb4d +size 27381 diff --git a/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/RG_VisionLink.uasset b/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/RG_VisionLink.uasset index f0c43d86..68f69959 100644 --- a/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/RG_VisionLink.uasset +++ b/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/RG_VisionLink.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f40722ce6381c0b65978b90489e162c36b1335524162d4b112fe22a6d382fc24 -size 108529 +oid sha256:27d39fdab60fb9511fcfe760ba9180190bdbe16c5f1f62357f88de13800d47b7 +size 108912 diff --git a/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/VL_Icon.png b/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/VL_Icon.png new file mode 100644 index 00000000..d40a89cc --- /dev/null +++ b/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/VL_Icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:163d14a68f1e9ec9560929fb14cd1f1a9fae3eaaceb55729ba8bd94926f9ac1a +size 7315 diff --git a/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/VL_Icon.uasset b/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/VL_Icon.uasset new file mode 100644 index 00000000..c4a60031 --- /dev/null +++ b/EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/VL_Icon.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95440712c856cd34fe77906b6c4fc85647181e6d06277829c741e41167abae08 +size 20322 diff --git a/EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset b/EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset index 9a1faba7..866d592f 100644 --- a/EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset +++ b/EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc3fc160627e9cb03cfa900bfa334561b0d7d22be21f5d273d86435f4538222d +oid sha256:bb9e2bad3be7351df336b7d68ea591f059abe8dc84cd11bfd10dd3bc41003b15 size 66790690 diff --git a/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetBase.h b/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetBase.h index a0b65dce..943c5761 100644 --- a/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetBase.h +++ b/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetBase.h @@ -53,6 +53,16 @@ protected: UPROPERTY(EditDefaultsOnly, Category = "Gadget") UInputAction* ActivateAction; + UPROPERTY(EditDefaultsOnly, Category = "Gadget") + UTexture2D* GadgetIcon; + + UPROPERTY(EditDefaultsOnly, Category = "Gadget") + FString GadgetDesc; + + UPROPERTY(EditDefaultsOnly, Category = "Gadget") + FString GadgetName; + + // Used by child classes to run custom gadget behaviour virtual void Activate(); @@ -84,6 +94,21 @@ public: { return GadgetRotation; } + + UTexture2D* GetGadgetIcon() + { + return IsValid(GadgetIcon) ? GadgetIcon : nullptr; + } + + FString GetGadgetDesc() + { + return GadgetDesc; + } + + FString GetGadgetName() + { + return GadgetName; + } // Sets default values for this actor's properties AGadgetBase(); diff --git a/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.cpp b/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.cpp new file mode 100644 index 00000000..661a1a5f --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.cpp @@ -0,0 +1,101 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "GadgetTutorialStation.h" + +#include "Blueprint/UserWidget.h" + +// Sets default values +AGadgetTutorialStation::AGadgetTutorialStation() +{ + // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. + PrimaryActorTick.bCanEverTick = true; + +} + +// Called when the game starts or when spawned +void AGadgetTutorialStation::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void AGadgetTutorialStation::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + +} + +void AGadgetTutorialStation::Interact() +{ + // opens up pick gadget widget + if (GadgetsArray.IsEmpty()) return; + + FInputModeUIOnly InputMode; + APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); + + PickGadgetWidget = CreateWidget(GetWorld(), PickGadgetWidgetClass); + PickGadgetWidget->AddToViewport(3); + + PlayerController->SetInputMode(InputMode); + PlayerController->bShowMouseCursor = true; + PlayerController->bEnableClickEvents = true; + PlayerController->bEnableMouseOverEvents = true; +} + +void AGadgetTutorialStation::InteractPrompt() +{ + +} + +FGadgetInfo AGadgetTutorialStation::NextGadget() +{ + FGadgetInfo GadgetInfo; + // Either wrap around to the beginning or increment gadget index + GadgetIndex = GadgetIndex >= GadgetsArray.Num() - 1 ? 0 : GadgetIndex + 1; + + GadgetInfo.GadgetIcon = GadgetsArray[GadgetIndex]->GetDefaultObject()->GetGadgetIcon(); + GadgetInfo.GadgetDesc = GadgetsArray[GadgetIndex]->GetDefaultObject()->GetGadgetDesc(); + GadgetInfo.GadgetName = GadgetsArray[GadgetIndex]->GetDefaultObject()->GetGadgetName(); + return GadgetInfo; +} + +FGadgetInfo AGadgetTutorialStation::PreviousGadget() +{ + FGadgetInfo GadgetInfo; + // Either wrap around to the end or decrement gadget index + GadgetIndex = GadgetIndex <= 0 ? GadgetsArray.Num() - 1 : GadgetIndex - 1; + + GadgetInfo.GadgetIcon = GadgetsArray[GadgetIndex]->GetDefaultObject()->GetGadgetIcon(); + GadgetInfo.GadgetDesc = GadgetsArray[GadgetIndex]->GetDefaultObject()->GetGadgetDesc(); + GadgetInfo.GadgetName = GadgetsArray[GadgetIndex]->GetDefaultObject()->GetGadgetName(); + return GadgetInfo; +} + +void AGadgetTutorialStation::SelectGadget() +{ + // Give Player the gadget + // Despawn current gadgetRange + // Spawn in the correct gadget range for the gadget + + UE_LOG(LogTemp, Warning, TEXT("Gadget Selected: %s"), *GadgetsArray[GadgetIndex]->GetDefaultObject()->GetGadgetName()); +} + +void AGadgetTutorialStation::CloseWidget() +{ + // close the widget + if (IsValid(PickGadgetWidget)) PickGadgetWidget->RemoveFromParent(); + + CollectGarbage(RF_PendingKill); + + FInputModeGameOnly InputMode; + APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); + PlayerController->SetInputMode(InputMode); + PlayerController->bShowMouseCursor = false; + PlayerController->bEnableClickEvents = false; + PlayerController->bEnableMouseOverEvents = false; +} + + + diff --git a/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.h b/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.h new file mode 100644 index 00000000..711576f8 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/GadgetSystem/GadgetTutorial/GadgetTutorialStation.h @@ -0,0 +1,68 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "EndlessVendetta/GadgetSystem/GadgetBase.h" +#include "EndlessVendetta/InteractionInterface.h" +#include "GameFramework/Actor.h" +#include "GadgetTutorialStation.generated.h" + +USTRUCT(BlueprintType) +struct FGadgetInfo +{ + GENERATED_BODY() + + UPROPERTY(BlueprintReadWrite, Category = "Gadget") + UTexture2D* GadgetIcon; + + UPROPERTY(BlueprintReadWrite, Category = "Gadget") + FString GadgetDesc; + + UPROPERTY(BlueprintReadWrite, Category = "Gadget") + FString GadgetName; +}; + +UCLASS() +class ENDLESSVENDETTA_API AGadgetTutorialStation : public AActor, public IInteractionInterface +{ + GENERATED_BODY() + + UPROPERTY(EditDefaultsOnly, Category = "Gadgets") + TArray> GadgetsArray; + + UPROPERTY(EditDefaultsOnly, Category = "Gadgets") + TSubclassOf PickGadgetWidgetClass; + + int GadgetIndex = 0; + + UUserWidget* PickGadgetWidget; + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + + void Interact() override;\ + + void InteractPrompt() override; + + UFUNCTION(BlueprintCallable) + FGadgetInfo NextGadget(); + + UFUNCTION(BlueprintCallable) + FGadgetInfo PreviousGadget(); + + UFUNCTION(BlueprintCallable) + void SelectGadget(); + + UFUNCTION(BlueprintCallable) + void CloseWidget(); + +public: + // Sets default values for this actor's properties + AGadgetTutorialStation(); + + // Called every frame + virtual void Tick(float DeltaTime) override; + +};