Adefinir
Finale
laravel_project
app
Models
Metiers
GameDesigner.php
Go to the documentation of this file.
1
<?php
2
namespace
App\Models\Metiers
;
3
4
use
App\Models\Employes
;
5
6
class
GameDesigner
{
7
8
// Nombre d'employé actuellement embauchés
9
private
int
$_nbEmployees = 0;
10
11
// ====================================================================
12
13
//Construct
14
public
function
_construct
() {
15
$this->_nbEmployees = 0;
16
}
17
25
public
function
workOnDesign
(
Employes
$employees) {
26
$employees->
incrementActionResults
(
"design"
, $this->_nbEmployees );
27
}
28
36
public
function
workOnScenario
(
Employes
$employees ) {
37
$employees->
incrementActionResults
(
"scenario"
, $this->_nbEmployees );
38
}
39
47
public
function
workOnDifficulty
(
Employes
$employees ){
48
$employees->
incrementActionResults
(
"difficulty"
, $this->_nbEmployees );
49
}
50
58
public
function
hireGameDesigner
() : int {
59
60
//On ajoute un employé de cette classe de métier
61
$this->_nbEmployees += 1;
62
return
$this->_nbEmployees;
63
}
64
72
public
function
fireGameDesigner
() : int {
73
74
//On vérifie si le joueur à au moins un employé de cette classe de métier
75
if
($this->_nbEmployees != 0){
76
77
//Si oui , on enlève un employé de cette classe de métier au total
78
$this->_nbEmployees = $this->_nbEmployees - 1;
79
}
80
return
$this->_nbEmployees;
81
}
82
}
App\Models\Metiers\GameDesigner
Definition:
GameDesigner.php:6
App\Models\Employes
Definition:
Employes.php:24
App\Models\Metiers\GameDesigner\workOnScenario
workOnScenario(Employes $employees)
Definition:
GameDesigner.php:36
App\Models\Employes\incrementActionResults
incrementActionResults(string $varName, int $increment)
Definition:
Employes.php:202
App\Models\Metiers
Definition:
Developpeur.php:2
App\Models\Metiers\GameDesigner\fireGameDesigner
fireGameDesigner()
Definition:
GameDesigner.php:72
App\Models\Metiers\GameDesigner\_construct
_construct()
Definition:
GameDesigner.php:14
App\Models\Metiers\GameDesigner\workOnDifficulty
workOnDifficulty(Employes $employees)
Definition:
GameDesigner.php:47
App\Models\Metiers\GameDesigner\workOnDesign
workOnDesign(Employes $employees)
Definition:
GameDesigner.php:25
App\Models\Metiers\GameDesigner\hireGameDesigner
hireGameDesigner()
Definition:
GameDesigner.php:58
Generated by
1.8.20