@@ -30,6 +30,21 @@ class ABatteryCollectorCharacter : public ACharacter
3030 UPROPERTY (VisibleAnywhere, BlueprintReadOnly, Category=Camera)
3131 float BaseLookUpRate;
3232
33+ /* * Accessor function for initial power */
34+ UFUNCTION (BlueprintPure, Category = " Power" )
35+ float GetInitialPower ();
36+
37+ /* * Accessor function for current power */
38+ UFUNCTION (BlueprintPure, Category = " Power" )
39+ float GetCurrentPower ();
40+
41+ /* *
42+ Function to update the character's power
43+ * @param PowerChange This is the amount to change the power by, and it can be positive or negative.
44+ */
45+ UFUNCTION (BlueprintCallable, Category = " Power" )
46+ void UpdatePower (float PowerChange);
47+
3348protected:
3449
3550 /* * Called for forwards/backward input */
@@ -65,6 +80,15 @@ class ABatteryCollectorCharacter : public ACharacter
6580 UFUNCTION (BlueprintCallable, Category = " Pickups" )
6681 void CollectPickups ();
6782
83+ /* *The starting power level of our character */
84+ UPROPERTY (EditAnywhere, BlueprintReadWrite, Category = " Power" , Meta = (BlueprintProtected = " true" ))
85+ float InitialPower;
86+
87+ private:
88+ /* *Current power level of our character */
89+ UPROPERTY (VisibleAnywhere, Category = " Power" )
90+ float CharacterPower;
91+
6892public:
6993 /* * Returns CameraBoom subobject **/
7094 FORCEINLINE class USpringArmComponent * GetCameraBoom () const { return CameraBoom; }
0 commit comments