SaveCommand.cpp 350 B

123456789101112131415
  1. #include "SaveCommand.h"
  2. #include "Game.h"
  3. SaveCommand::SaveCommand()
  4. : ChatCommand("save", "Saves the game", 0)
  5. {}
  6. void SaveCommand::execute(
  7. Framework::RCArray<Framework::Text> params, Entity* zActor) const
  8. {
  9. Game::INSTANCE->save();
  10. Game::INSTANCE->zChat()->broadcastMessage(
  11. "The game was saved.", Chat::CHANNEL_INFO);
  12. }