*FREE code for this video on my Patreon*
In this episode we'll take a look at how to use C#'s interfaces to make generic items. Using this, we'll be able to write a clean and easy pick up/collector script for our player!
❗️❗️❗️📢 BUY THE COMPLETE GAME TEMPLATE NOW!!! 👾❗️❗️❗️
https://gamecodelibrary.itch.io/2d-pl...
All source code for all videos I have made and will make in the future can be found on my Patreon:
/ item-collection-90367978
Check out the series previous videos:
• FULL Platformer Tutorial Series - Unity 2D
Sprite sheet: https://www.kenney.nl/assets/1-bit-pl...
Discord: / discord
I'll be posting new videos every week, so be sure to subscribe to see what kind of adventure we can go on together! I'm excited! :-)
If you have any suggestions, feedback or questions, be sure to comment below! Any opinions will help me out on this journey ♡
0:00 - Intro
0:08 - What are Interfaces?
0:49 - IItem Interface Script
1:25 - Gem Script
2:00 - Collector Script
3:11 - Gem Prefab
3:33 - Working!
3:39 - Styling our Gems
4:33 - Outro