forked from halo-battle/game
Version 1.9g
This commit is contained in:
parent
d028822d0b
commit
4c9814a99c
800 changed files with 237325 additions and 1949 deletions
48
game/cron/class.user.php
Normal file
48
game/cron/class.user.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
/***************************************************************************
|
||||
* class.user.php
|
||||
* ----------------
|
||||
* begin : Dimanche 7 septembre 2008
|
||||
* update : Dimanche 7 septembre 2008
|
||||
* email : nemunaire@gmail.com
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
class User{
|
||||
var $id_user,
|
||||
$technologies = array(),
|
||||
$credits;
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
* @param int $id id de la planète à importer
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
function User($user){
|
||||
global $technoloVAR;
|
||||
$this->id_user = $user["id"];
|
||||
$this->credits = $user["credits"];
|
||||
|
||||
foreach($technoloVAR as $tech){
|
||||
$this->technologies[] = $user[$tech];
|
||||
}
|
||||
}
|
||||
|
||||
function calculerTechnologies(){
|
||||
global $technoloCALC;
|
||||
$pointstech = 0;
|
||||
$planete = $this;
|
||||
|
||||
foreach($this->batiments as $k => $n){
|
||||
eval($technoloCALC[$k][0]);
|
||||
eval($technoloCALC[$k][1]);
|
||||
eval($technoloCALC[$k][2]);
|
||||
$pointstech += $a + $b + $c;
|
||||
}
|
||||
|
||||
return $pointstech;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue