-
-
Save SamuXarick/90ba38434f72fd9aacdc531582eb0cc7 to your computer and use it in GitHub Desktop.
how to make a template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Broadcast a new event to all active AIs, and to the Game Script. | |
*/ | |
template <class ScriptEventType, typename ... Args> | |
static void BroadcastNewEvent(Args ... args, CompanyID skip_company = MAX_COMPANIES) { | |
AI::BroadcastNewEvent(new ScriptEventType(args...), skip_company); | |
Game::NewEvent(new ScriptEventType(args...)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment