Posts Tagged: infinixsoft

State Pattern using Unity

While programming your in-game entities, there are cases where they need to behave differently under different conditions, which suggests an idea of a┬ástate. But if you choose to employ a brute-force method, the code will quickly become an untangled mess with a lot of if-else conditions, nested and otherwise. To solve this problem elegantly, you […]