lostFaceTime

This commit is contained in:
Ruben 2016-09-16 18:03:28 +01:00
parent 8dc9963e98
commit 153bc312b9
2 changed files with 31 additions and 0 deletions

View file

@ -78,6 +78,7 @@ class ScoreControllerProvider implements ControllerProviderInterface
$game = new Models\Game(); $game = new Models\Game();
$game->setUser($user); $game->setUser($user);
$game->setLevel($level); $game->setLevel($level);
$game->setLostFaceTime((float) $data['lost_face_time']);
$game->setOriginalGameAt(new \DateTime($data['time'])); $game->setOriginalGameAt(new \DateTime($data['time']));
$map_hits = []; $map_hits = [];

View file

@ -49,6 +49,12 @@ class Game
*/ */
private $score; private $score;
/**
* @ORM\Column(type="float")
* @var float Time the face was lost during playing the game
*/
private $lostFaceTime;
/** /**
* @var \DateTime $originalGameAt * @var \DateTime $originalGameAt
* *
@ -275,4 +281,28 @@ class Game
{ {
$this->achievements->add($a); $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;
}
} }