コード例 #1
0
 public function onCompletion(Server $server)
 {
     $hub = DynamicHub::getInstance($server);
     if ($hub !== null) {
         $game = $hub->getLoadedGame($this->gameName);
         if ($game instanceof MatchBasedGame) {
             $match = $game->getMatchById($this->matchId);
             if ($match !== null) {
                 $match->onMapLoaded($this->getResult());
             }
         }
     }
 }
コード例 #2
0
 public function onEnable()
 {
     $hub = DynamicHub::getInstance($this->getServer());
     $hub->loadGame($this->game = new CTFGame($this));
 }