Sheep Quest Devlog 5


In this devlog I created Item Pickups.


while in close proximity to a pickup the pickup panel from the UI will show up , after pressing the pickup button the description panel will temporarily display.


A timer controls the visibility of the description panel, its timer is reset upon pressing the pickup button (space). The pickupInRange bool controls the visibility of the pickup panel.


If displaying the related panels display the name and description of the current pickup to the info panel, and the sprite of the pickup panel to be the current pickup.


pressing the X button on the description panel sets the timer to 0 closing it immediately.  SetPickupInfo function allows pickups to send their info to the world player UI script.  SetIsInRange is used by pickups that have the player enter their  trigger zone to tell the world player UI script if a pickup is in range.


The pickup script holds information about the pickup, it starts by getting a reference to the world player UI script. Pickups have a small CircleCollider2D that checks using tags if the player has entered its radius. If it is triggered by the player it sends its info to the world player UI script and sets the isPickupInRange bool to true, on trigger exit it  sets the  bool to false.

Leave a comment

Log in with itch.io to leave a comment.