-
Notifications
You must be signed in to change notification settings - Fork 4
Effects Component and Collision Mechanics
Component class in charge of the projectile effects for both single target projectiles and AOEs. The effects can be used in conjunction with different collision mechanics. This component was designed to create a wider variety of projectiles to be used for special mobs, mob bosses and towers.
- Fire ball: Deals damage to target based on hosts' CombatStatsComponent.
- Burn: applies 5 ticks of damage from hosts' CombatStatsComponent over 5 seconds.
- Slow: applies slow effect to targetEntity. If entity is a mob, speed and firing rate will be slowed. If entity is a tower, firing rate will be slowed.
- Stun: applies stun effect to a target entity for 5 seconds.
Refer to Projectile Factory on how to use functionality from this class.
Tower
The tower entity will implement the special effects based on the tower design. For example, the Droid tower will implement the slow effect whereas the Fire tower will implement the burn effect.
Mob King
The mob king entity are also able to implement the combination of effects and collisions to differentiate itself from the general mobs. This is assumed that the mob kings apply the most amount of damage.
General Mobs
General mob entities are also able to use specific effect components when the game is progressing to a new level. This is assumed as levels will continue to get harder so mobs will become more powerful.
Effect Projectile
There are 5 degrees of customisation:
-
targetLayer
: Specify which layer of entities are valid targets (e.g PhysicsLayer.TOWER) -
destination
: the location the projectile should be shooting towards -
speed
: speed of the projectile -
effect
: the type of effect chosen - burn, slow or stun -
aoe
: if the projectile will have the AOE component
Pierce Fireball
3 degrees of customisation:
-
targetLayer
: Specify which layer of entities are valid targets -
destination
: the location the projectile should be shooting towards -
speed
: speed of the projectile
Ricochet Fireball
4 degrees of customisation:
-
targetLayer
: Specify which layer of entities are valid targets -
destination
: the location the projectile should be shooting towards -
speed
: speed of the projectile -
bounceCount
: how many times the projectile has ricocheted
Split Fireworks Fireball
4 degrees of customisation:
-
targetLayer
: Specify which layer of entities are valid targets -
destination
: the location the projectile should be shooting towards -
speed
: speed of the projectile -
amount
: number of fireworks after collision
-
applySingleEffect
: Used for a single projectile to apple damage to one entity only. -
applyAoeEffect
: Used for AOE projectiles to apple the damage of the effect to an area. -
burnEffect
: Applies 5 ticks of damage from hosts' CombatStatsComponent over 5 seconds. Specified throughtargetLayer
. -
slowEffect
: Applies slow effect to targetEntity. Specified throughtargetLayer
- if entity is a mob, speed and firing rate will be slowed. If entity is a tower, firing rate. -
stunEffect
: Applies the stun effect to thetargetLayer
. This effect will stop the entity from shooting/moving.
- Components should have
HitboxComponent
ensures that entity will take damage/effect of the projectile -
targetLayer
should be clearly defined for correct application of projectile to specified entity