21 virtual QJsonObject
toJson()
const override;
22 virtual void doWork()
override;
The ProjectileHitCommand indicates that a projectile hit a wagon. It contains the wagonIndex as well ...
Definition: projectilehitcommand.h:15
Definition: commands.h:13
virtual QJsonObject toJson() const override
Every command must define how its members can be serialized.
Definition: projectilehitcommand.cpp:29
int wagonIndex() const
Definition: projectilehitcommand.h:27
ProjectileHitCommand(Timer::TimerMSec timeStamp, bool rightTrain, int wagonIndex, float damage)
Definition: projectilehitcommand.cpp:12
Commands
The Commands enum stores all command types with corresponding ID.
Definition: commands.h:9
float damage() const
Definition: projectilehitcommand.h:28
virtual Commands commandType() const override
Every Command must specify its type.
Definition: projectilehitcommand.h:24
bool m_rightTrain
Definition: projectilehitcommand.h:31
signed int TimerMSec
Definition: timer.h:22
float m_damage
Definition: projectilehitcommand.h:33
Definition: eventhandler.cpp:18
Timer::TimerMSec timeStamp() const
get the time as counted by the sending game that this command was created and sent ...
Definition: abstractcommand.cpp:54
bool rightTrain() const
Definition: projectilehitcommand.h:26
The AbstractCommand class defines the interface that every command has to implement.
Definition: abstractcommand.h:23
virtual void doWork() override
Every Commands must define its effects on the receiving game.
Definition: projectilehitcommand.cpp:38
int m_wagonIndex
Definition: projectilehitcommand.h:32