Systems and Components
Overview
This section covers all systems and components that are updated by simulation systems inside of Quantum.
The sections are organized in logic modules which include the systems, components and assets relevant to each one of them. This same structure is found inside the Quantum Project of the Tower Rush Sample.
Gameplay
The GameplaySystem
and Gameplay
component are responsible for handling the gameplay loop (WaitingForPlayer
, Match
, Overtime
, Finished
). They check the win conditions and keep the players’ scores. The Gameplay
component is also in charge of keeping track of the PlayerAreas
. The PlayerArea
is an area where a player is allowed to play their cards. It is defined by a rectangle and blocked areas. A blocked area is defined by a rectangle and an entity which needs to be active in order for the blocked area to be active.
The GameplaySettings
asset defines the player's castle and tower settings, all available cards, match start energy, maximum energy and their behaviour in the various gameplay states (e.g.: duration and energy fill rate).
CardManager
Holds information about the player's energy and cards in hand and queue of cards.
Unit
Defines Unit’s level and behaviour
- Spawner: periodic spawning of other entities - Units, EffectAreas…
- Lifetime: maximum duration of Unit, can remove health periodically
- SpawnOnDeath: Spawn of other entities on death - Units, EffectAreas…
UnitStats
Keeps track of Unit’s stats that can be modified by external sources (EffectsArea
cards).
UnitAI
Is responsible for selecting the Unit's target. There are three possible types of targets:
- UnitGround
- UnitAir
- Building
Buff and Buffs
Buff
is a component that modifies a target's UnitStats
or Health
and keep track of active Buff(s)
on a Unit
. They have different behaviours:
- Duration: defines how long does the buff last since last refresh
- HealthOverTime : periodic changes of current health (damage and heal)
- Stats : Absolute and percentage change of any Stat
Weapon
Handles Unit’s attack. Can have different behaviours:
- SingleTarget: instantly attacks other
Unit
- Projectile: spawn a
Projectile
which hits a targetedUnit
Parameters:
- Behaviour
- Damage
- AttackRange
Projectile
Projectiles are fired from the Weapon
. Once fired it always hits the target. It can have different behaviours:
- SingleTarget: deals damage to the target
- AreaOfEffect: deals damage in the targeted area
EffectArea
Special type of card that can be played by Player. Periodically affects Units
in the targeted area. It can have different behaviours:
- Damage: deals damage to enemy
Units
- Buff: applies
Buff
toUnit’s
in the area
Movement
Moves and rotates the Unit
based on data from Quantum NavMesh navigation.
Target
Component marking entity as a target. It has size and type:
- UnitGround
- UnitAir
- Building
Health
Keeps track of Unit’s
current and maximum health.