Role: Programmer/Artist
Their purpose is to remove items left on the floor for a specific amount of time and then teleport them to the available back stocks shelf locations which are in the furthest room of the level.
The first script is the floor sweep which is attached to the floor. When an items colides with it's mesh it will spawn an empty object at the items locations. This empty game object has a timer script on it that holds the gameobject of the item it was spawned for and will be added to the Back Stocks queue list. This empty game object will be deleted when the player removes the object from the floor which will cause it to be removed from the queue list as well. When the timer runs out it will activate a bool which will lets backstocks know that the item can be added to the backstocks item list and the empty game object will delete itself, but not before spawning another empty game object at it's location which simply holds the particle effect and a destroy self script which will destroy itself after a specificed amount of time.
The Back Stocks is attached to an empty game object and acts like a manager. It contains 4 lists. A shelf locations list that holds all the shelf locations taged with Backstock which is added to the list on Awake. A shelf pool list which is updated perioticly by deleting it own list, then refilling it with all shelves in the shelf locations list that have an occupied bool set to false. And then there is a queue list mentioned previously that holds the timer objects when they spawn to ensure nothing overlaps when the timers finish. Back Stocks is checking the queue list whenever there is something in it, so if the bool for the fist object in the queue is true, then it moves it to the fourth list which is the Back Stocks item list and of course removes it from the queue list. Using For Loops, the Back Stocks will go throught the shelf pool list, then teleport the item to the first available shelf location in that list, sets an occupied bool on the shelf location to true, removes the item from the Back Stocks item list, and then removes that shelf location from the shelf pool list. When an item is removed from the shelf by any means, the occupied bool will also become false, making it so that the shelf pool list will re-add it back to it's list so that future items can be teleported to its location again.
And the final thing is that if the shelf pool is empty and there for all shelf locations are full, then items will simply be teleported and spat out of a floating point in the middle back stocks.
Wand Idle Anim
Wand Pickup Anim
Wand Place Anim
Wand Throw Anim
Wand Drop Anim
Wand Tip particle effect & trail
Item Teleportation particle effect
Item Held particle effect & wand tip effect
Potion Creation particle effect
Item trail effect