This PR implements the 'Harvest' animation for the BerryTree when the user clicks on it. It introduces a new state, setUserHarvesting, in store.js to track when the user is in the process of harvesting. The animation will only play when the player is within a certain range of the BerryTree, similar to how the animation is played when userAttacking is true.
Summary of Changes
Added a new state, setUserHarvesting, in store.js to track when the user is in the process of harvesting.
Modified PlayerController.tsx to include the logic for playing the 'RightHook' animation when the user is harvesting and within range of the BerryTree.
Implemented a check to ensure that the 'RightHook' animation only plays when the player is within a certain range of the BerryTree.
Added a new function, walkTowardsBerryTree, in PlayerController.tsx to move the player towards the BerryTree when setUserHarvesting is true.
Modified the existing walkToPointOnLand function in PlayerController.tsx to call walkTowardsBerryTree when setUserHarvesting is true.
Fixes #2.
🎉 Latest improvements to Sweep:
Getting Sweep to run linters before committing! Check out Sweep Sandbox Configs to set it up.
Added support for self-hosting! Check out Self-hosting Sweep to get started.
[Self Hosting] Multiple options to compute vector embeddings, configure your .env file using VECTOR_EMBEDDING_SOURCE
💡 To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
PR Feedback (click)
Description
This PR implements the 'Harvest' animation for the BerryTree when the user clicks on it. It introduces a new state,
setUserHarvesting
, instore.js
to track when the user is in the process of harvesting. The animation will only play when the player is within a certain range of the BerryTree, similar to how the animation is played whenuserAttacking
is true.Summary of Changes
setUserHarvesting
, instore.js
to track when the user is in the process of harvesting.PlayerController.tsx
to include the logic for playing the 'RightHook' animation when the user is harvesting and within range of the BerryTree.walkTowardsBerryTree
, inPlayerController.tsx
to move the player towards the BerryTree whensetUserHarvesting
is true.walkToPointOnLand
function inPlayerController.tsx
to callwalkTowardsBerryTree
whensetUserHarvesting
is true.Fixes #2.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: