Change Behaviors with the Strategy Pattern - Unity and C#

Описание к видео Change Behaviors with the Strategy Pattern - Unity and C#

The strategy pattern is all about encapsulating or wrapping up a behavior or algorithm in its own class. It has the added bonus of allowing behaviors or algorithms to be assigned at runtime! If you have a mess of if statements or switch statements trying to control or adjust behaviors then the strategy pattern might just be what you need to clean up your code.

0:00 Intro
0:37 Problems Solved
2:51 Strategy Pattern
3:11 Interface Definition
3:32 Interface Instance Variable
4:05 Fire Damage Example
5:12 Ice Damage Example
5:25 Generic Weapon
5:39 Changing Behaviors
6:25 Combination of Behaviors
6:51 Final Thoughts
7:56 THE END

Blog Post of Strategy Pattern: https://onewheelstudio.com/blog/2020/...
Game Programming Pattern Book (affiliate): https://amzn.to/315mVBg

Become A Channel Member:    / @onewheelstudio  
New Merch: http://merch.onewheelstudio.com/

My video and streaming kit: https://kit.co/onewheelstudio/tutoria...
Recommended Game Design Books: https://kit.co/onewheelstudio/game-de...

Discord: http://discord.onewheelstudio.com
Patreon:   / onewheelstudio  
Twitter:   / onewheelstudio  
Devlog: https://onewheelstudio.com/
Twitch:   / onewheelstudio  

#programmingpatterns #strategypattern #unitytutorial #csharp

Комментарии

Информация по комментариям в разработке