예제 #1
0
파일: Forest.php 프로젝트: Dever4eg/game
 public function Chop()
 {
     //Увеличеваем дерево на складе на 1
     $stock = Stock::FindByColumn('login', Auth::GetLogin());
     $stock->wood += 1;
     $stock->save();
     if ($this->height != 1) {
         $this->height -= 1;
         $this->state = 'chopping';
         $this->save();
     } else {
         $this->height = null;
         $this->state = 'find';
         $this->found = false;
         $this->save();
     }
 }
예제 #2
0
파일: Game.php 프로젝트: Dever4eg/game
 public function ActionStock()
 {
     $stock = Stock::FindByColumn('login', Auth::GetLogin());
     $this->view->stock = $stock;
     $this->view->display('Game/stock');
 }