Barber Style Shop

grhys

New member
Hey there,

I am looking to set up a Barber style shop -user can purchase hairs, beards, and color them.

Just wondering best way to go with this with the system - as I understand it, I should make a Hair inventory, and a Beard inventory.

Is there a way to make the purchase of each item to automatically add to these inventories, and then be equipped to the player?

Bit confused if I would need to add item collection restriction objects to force the items to go to the appropriate inventory?

Any guidance greatly appreciated!
 
That really depends how you want things to look visually and how you want it to work functionaly.

The easiest solution is to have an ItemSlotCollection on your character with a slot for hair, beard, etc... and use an equipper to visually equip them.
Then when you buy an item you can give the item to that collection. I believe there is an option on the shop to define where bought items should go to.

Otherwise you could set the main item collection of your character as an ItemTransactionCollection:

This would allow you to give the item to the collection you want whereever it came from.


As for the Shop Inventory you could set it up similarly to the demo scene. There is a single Inventory with a single ItemCollection. The Shop UI simply shows the items by category.

That's the way to go if you want to make it without code.
But it has some limitations, for example you wouldn't be able to preview the haircut unless you buy the item. And that would replace you current hair cut with no way to go back.



If you feel comfortable coding you can take any other approach you want. It's really up to you. But an easy route would be to set it up as described above and add a functionality to save your haircut item before entering the shop. Then make all items free so that you can select them to preview them. Then when you exit the shop it would charge you the amount.

I hope that points you in the right direction.
 
Top