The ProjectileFiredCommand indicates that a projectile has been fired and contains the position as well as the movement vector.
More...
#include <projectilefiredcommand.h>
The ProjectileFiredCommand indicates that a projectile has been fired and contains the position as well as the movement vector.
A projectile that gets spawned as result of this command has the AbstractPhysicsObject::m_spawnedLocally flag set to false. This means that collisions of this projectile do not deal any damage.
- See also
- ProjectileHitCommand, Projectile
terminus::ProjectileFiredCommand::ProjectileFiredCommand |
( |
Timer::TimerMSec |
timeStamp, |
|
|
QVector3D |
startPosition, |
|
|
QVector3D |
velocity |
|
) |
| |
terminus::ProjectileFiredCommand::ProjectileFiredCommand |
( |
Timer::TimerMSec |
timeStamp, |
|
|
QJsonObject |
jsonObject |
|
) |
| |
Commands terminus::ProjectileFiredCommand::commandType |
( |
| ) |
const |
|
overridevirtual |
void terminus::ProjectileFiredCommand::doWork |
( |
| ) |
|
|
overridevirtual |
Every Commands must define its effects on the receiving game.
This Method is guaranteed to be executed in the receiving game's frame update context with a valid Game instance in m_game
Implements terminus::AbstractCommand.
QVector3D terminus::ProjectileFiredCommand::startPosition |
( |
| ) |
const |
QJsonObject terminus::ProjectileFiredCommand::toJson |
( |
| ) |
const |
|
overridevirtual |
Every command must define how its members can be serialized.
- Returns
- A QJsonObject containing the parameters / members
Implements terminus::AbstractCommand.
QVector3D terminus::ProjectileFiredCommand::velocity |
( |
| ) |
const |
QVector3D terminus::ProjectileFiredCommand::m_startPosition |
|
protected |
QVector3D terminus::ProjectileFiredCommand::m_velocity |
|
protected |
The documentation for this class was generated from the following files: