Top down tower defense
guigsc
https://github.com/guigsc/TopDownTowerDefense Top down tower defense survival game. // abstraction All over the code // inheritance on Enemy: There are 2 types of enemies: close combat and ranged that inherits from the base class Enemy on Target: There are 2 types of targets: tower and enemy. Both share the same base class Target which identify the object as targetable with health and possibility of taking damage. When the projectile hits, it finds the Target component (tower or enemy) and then emit an event so the projectile can check if it is supposed to hit one or another, by casting the base class into Enemy or Tower // polymorphism on Enemy: For each enemy, the attack method is overriden. on Tower: the TakeDamage method is virtual and can be overriden in case it needs to add more functionality to it. // encapsulation all properties and methods are encapsulated. Parent properties and methods which need to provide access to childs are encapsulated with protected keyword, and public and private following theirs obvious rules.
Made with
You may also like
Struckd Showdown
2,850,409 plays
getaway shootout
2,712,142 plays
NEW!!! WARTEN Battle Royale
1,886,358 plays
ЖАБЫ ПАРКУРЯТ
1,441,655 plays
Alpaca Race
1,385,318 plays
SuperSquad : PirateAttacks
1,297,861 plays
Speed Racer
1,182,634 plays
Campo de batalha
1,084,260 plays
ELDAN STORY 1
1,069,657 plays
Bored Ape || Head Volley
989,415 plays
0 / 200