initial dig functionality; need to clean up kruft

This commit is contained in:
jadebenn
2023-11-18 18:43:47 -06:00
parent a58ffcc4ec
commit 5734ef85e8
6 changed files with 162 additions and 29 deletions

View File

@@ -29,6 +29,12 @@ public:
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
void Update(float deltaTime) override;
/**
* Handles the pet dig interaction
* @param deltaTime time elapsed
*/
void InteractDig(float deltaTime);
/**
* Handles an OnUse event from another entity, initializing the pet taming minigame if this pet is untamed.
* @param originator the entity that triggered the event
@@ -172,6 +178,23 @@ public:
*/
void SetPreconditions(std::string& conditions);
/**
* Sets if the pet is ready to dig
* @param isReady whether the pet is ready to dig (true) or not (false)
*/
void SetIsReadyToDig(bool isReady);
/**
* @return is pet ready to dig
*/
bool GetIsReadyToDig() { return m_ReadyToDig; };
/**
* Sets pet's treasure timer
* @param digTime float representing the treasure dig time in seconds
*/
void SetTreasureTime(float digTime) { m_TresureTime = digTime; };
/**
* Returns the entity that this component belongs to
* @return the entity that this component belongs to
@@ -341,6 +364,16 @@ private:
*/
float m_TresureTime;
/**
* Boolean that sets if a pet is ready to dig and display the interact prompt
*/
bool m_ReadyToDig;
/**
* Boolean that sets if a pet is in an interaction
*/
float m_InInteract;
/**
* The position that this pet was spawned at
*/