Tower Defense 2D Game
This is my first unity project which practice skills to build a simple tower defense game from coding in c# and unity engine.
Play button
Music button
Effect button
Status bar
(use singleton design that makes this class can be access by entire system)Difference tower button
Speed button
Start button
Game menu with debug grid show tile layouts for placing tower from tower button at UI.
In Tower class, there are several attributes such as damage, range, target etc.
There are 3 extended classes using inheritance of tower class that is archer, stone, and ice tower.
There are 3 extended classes using inheritance of bullet class that is arrow, stone magic, and ice magic.
In ice magic, there are special effect slow enemy which this effect will be apply on enemy class.
Each extended bullet class are different behavior for move transition.
Enemy class
- There is one attribute that is debuff class which design by polymorphism concept for take different debuff.
- Control by EnemyAI class, this class will call methods from enemy class such as add debuff or move position, etc. There is a game system class calculate the path (use Astar algorithm for path finding) for enemy AI which path will be store in EnemyAi class
Grid system using generic type for different type of grid. For example, Tile grid be used to placing tower, path grid for navigation etc.