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
getaway shootout
2,867,661 plays
Station Saturn
1,039,895 plays
Bored Ape || Head Volley
993,328 plays
Vortex.io
826,558 plays
像素火影
785,000 plays
NIMRODS
307,389 plays
BETAGAME
281,268 plays
ICEE Scream: Haunted Bubbles
272,114 plays
MultiplayerShooterGame v2
271,237 plays
Rhythm Hell
257,360 plays
0 / 200