Scalable Code With Decorator Pattern || Unity Tutorial

Publicado em: 19 Agosto 2024
no canal de: Freedom Coding
576
34

Did you ever need to extend or modify a class but adding more code into the class itself doesn't seem like the right solution? Meet the decorator pattern. Using it, you can change the behavior of a class by wrapping it inside the decorator. The decorator still acts as the class it is wrapping because they both implement a common interface. This way it is simple to add multiple accessories to weapons and armor, add buffs to enemies and the player, and do much more!

👍 Like and 🔔Subscribe for More Unity and C# Tutorials    / @freedomcoding  

🌟 Support My Work and Unlock Exclusive Content! 🌟
👉 Patreon:   / freedomcoding  

🎮 Join Our Developer Community!
💬 Discord:   / discord  

💖 Support Me Financially
☕ PayPal: jani.steckerova@seznam.cz

Project files -   / 110379257  
Website - https://www.freedom-coding.com

Timestamps:
00:00 Why Should I Use Decorator?
00:57 Understanding The Pattern
01:50 Component (1.)
02:08 Concrete Component (2.)
02:18 Decorator (3.)
04:04 Concrete Decorators (4.)
04:59 Client (5.)
06:32 Decorating Pistol Data
11:28 Final Result


Nesta página do site você pode assistir ao vídeo on-line Scalable Code With Decorator Pattern || Unity Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Freedom Coding 19 Agosto 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 576 vezes e gostou 34 espectadores. Boa visualização!