diff --git a/src/Api/ScoreControllerProvider.php b/src/Api/ScoreControllerProvider.php index 32cae4d..9f3750e 100644 --- a/src/Api/ScoreControllerProvider.php +++ b/src/Api/ScoreControllerProvider.php @@ -78,6 +78,7 @@ class ScoreControllerProvider implements ControllerProviderInterface $game = new Models\Game(); $game->setUser($user); $game->setLevel($level); + $game->setLostFaceTime((float) $data['lost_face_time']); $game->setOriginalGameAt(new \DateTime($data['time'])); $map_hits = []; diff --git a/src/Models/Game.php b/src/Models/Game.php index c92b351..6167464 100644 --- a/src/Models/Game.php +++ b/src/Models/Game.php @@ -49,6 +49,12 @@ class Game */ private $score; + /** + * @ORM\Column(type="float") + * @var float Time the face was lost during playing the game + */ + private $lostFaceTime; + /** * @var \DateTime $originalGameAt * @@ -275,4 +281,28 @@ class Game { $this->achievements->add($a); } + + /** + * Gets the value of lostFaceTime. + * + * @return float Time the face was lost during playing the game + */ + public function getLostFaceTime() + { + return $this->lostFaceTime; + } + + /** + * Sets the value of lostFaceTime. + * + * @param float Time the face was lost during playing the game $lostFaceTime the lost face time + * + * @return self + */ + public function setLostFaceTime($lostFaceTime) + { + $this->lostFaceTime = $lostFaceTime; + + return $this; + } }