Changing Weapon Sprites - Multi-Weapon System in Unity - Part 5
Today we are working on the first weapon component! The WeaponSprite component! It is responsible for displaying the correct weapon sprite for the current attack frame. All Assets: https://drive.google.com/drive/folders/17JbMy70gbXLcPYrIIpwYt7xJmKngu0oB?usp=sharing Discord Server: https://discord.gg/uHQrf7K If you wish to support me more: https://www.patreon.com/Bardent GitHub link for this part: https://github.com/Bardent/Weapon-System-Tutorial-Series-Unity/tree/18c262077430f4e3704b54ce7d509cba2e854bbe GitHub Repo Link: https://github.com/Bardent/Weapon-System-Tutorial-Series-Unity Player Controller Series: https://www.youtube.com/playlist?list=PLy78FINcVmjA0zDBhLuLNL1Jo6xNMMq-W 00:00 - Intro 00:22 - Creating the WeaponComponent and WeaponSprite 02:29 - The WeaponSprite Weapon Component 04:03 - Creating the WeaponSprites Class 05:32 - Referencing the Sprite Renderers 10:05 - Subscribing to Sprite Change Events 12:25 - Handling Base Sprite Changes 13:55 - Resetting the Current Sprite Index 15:21 - Weapon Sprite Game Object Setup 16:22 - Adding our Weapon Sprites 17:49 - Demonstration and errors 19:12 - Tracking when Attack is Active 21:15 - Updating OnEnable and OnDisable in WeaponSprite 21:56 - Set Sprite to Null when not attacking 22:30 - Warning if Sprite Counts don't match 24:20 - Final Demo 24:49 - Wrap-up 25:35 - Outro
Download
0 formatsNo download links available.