Sheep Quest Devlog 6


In this devlog I implemented an achievement system to the game.


Unlocking an achievement will cause a panel to display which achievement you unlocked for a short time.


A new achievement scene accessible from the main menu will display the achievements you have unlocked (yellow names) and have yet to unlock (red names).


While the player is moving a timer counts down every second before invoking the movedforasecondevent.


Achievement manager gets a reference to the player while in the world scene and adds a listener to the movedforasecondevent that calls the onesecondmovement function.


The onesecondmovement function searches through the list of achievements and applies progress to related achievements if they have not yet been unlocked.


Progressachievement adds progress to the current progress of the achievement if it reaches or exceeds the max progress of the achievement it calls unlockachievement.


The Unlockachievement function sets the achievement to unlocked true, gets the achievement manager and calls the manager's  activateachievmentpanel to display the newly unlocked achievement to the UI panel with the achievements sprite and name.

Leave a comment

Log in with itch.io to leave a comment.