src/eXpansion/Bundle/WidgetBestCheckpoints/Plugins/BestCheckpoints.php 1 location
|
@@ 92-100 (lines=9) @@
|
| 89 |
|
* |
| 90 |
|
* @param Record[] $records |
| 91 |
|
*/ |
| 92 |
|
public function onLocalRecordsLoaded($records) |
| 93 |
|
{ |
| 94 |
|
if (count($records) > 0) { |
| 95 |
|
$this->updater->setLocalRecord($records[0]->getCheckpoints()); |
| 96 |
|
} else { |
| 97 |
|
$this->updater->setLocalRecord([]); |
| 98 |
|
} |
| 99 |
|
$this->updater->update($this->allPlayers); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
/** |
| 103 |
|
* Called when a player finishes map for the very first time (basically first record). |
src/eXpansion/Bundle/WidgetBestRecords/Plugins/BestRecords.php 1 location
|
@@ 85-93 (lines=9) @@
|
| 82 |
|
* |
| 83 |
|
* @param Record[] $records |
| 84 |
|
*/ |
| 85 |
|
public function onLocalRecordsLoaded($records) |
| 86 |
|
{ |
| 87 |
|
if (count($records) > 0) { |
| 88 |
|
$this->widget->setLocalRecord($records[0]); |
| 89 |
|
} else { |
| 90 |
|
$this->widget->setLocalRecord(null); |
| 91 |
|
} |
| 92 |
|
$this->widget->update($this->allPlayers); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
/** |
| 96 |
|
* Called when a player finishes map for the very first time (basically first record). |