Beispiel #1
0
 //получить информацию об улице из бд
 public void TakeData(StreetPath streetPath)
 {
     this.idStreetParent = streetPath.GetIdStreetParent();
     this.idStreetPath   = streetPath.GetIdStreetPath();
     this.renta          = streetPath.GetRenta();
     this.start          = streetPath.start;
     this.end            = streetPath.end;
     this.isBridge       = streetPath.isBridge;
     this.namePath       = streetPath.namePath;
     this.CanBuy         = streetPath.canBuy;
     this.nameOfPrefab   = streetPath.nameOfPrefab;
 }
Beispiel #2
0
 public override void move(StreetPath path)
 {
     if (StepsInJail == 0)
     {
         if (!isMoving && !corutine)
         {
             corutine = true;
             way      = _dbWork.GetWay(currentStreetPath.GetIdStreetPath(),
                                       path.GetIdStreetPath());
             isCheating = true;
             _gameCanvas.OnOffSavedButtons();
             StartCoroutine(GoBot());
         }
     }
 }
Beispiel #3
0
 //запуск корутины движения
 public virtual void move(StreetPath path)
 {
     if (StepsInJail == 0)
     {
         if (!isMoving && !corutine)
         {
             corutine = true;
             way      = _dbWork.GetWay(currentStreetPath.GetIdStreetPath(),
                                       path.GetIdStreetPath());
             if (currentSteps + way.Count > maxSteps && !isGonnaBeCathced && !alreadyCheat)
             {
                 GameController.aboutPlayer += "Игрок " + NickName + " пытается смухлевать" + "\n";
                 _gameCanvas.OpenWarningWindow(this);
                 isCheating = true;
             }
             _gameCanvas.OnOffSavedButtons();
             StartCoroutine(Go());
         }
     }
     else
     {
         _gameCanvas.ShowInfoAboutEvent("Вы заключены под стражу" + "\n" + "Осталось ходов: " + StepsInJail);
     }
 }
Beispiel #4
0
 //обновить данные о части улицы
 public void updatePath(StreetPath path)
 {
     paths[path.GetIdStreetPath()] = path;
 }