Ngắn gọn, dễ sữ dụng nhưng rất hiệu quả.
NotificationCenter.getInstance().addEvent("GAME_DEACTIVE", callback);
NotificationCenter.getInstance().removeEvent("GAME_DEACTIVE", callback);
void callback(string eventName, object data) {
}
NotificationCenter.getInstance().dispatchEvent("GAME_DEACTIVE", data);