예제 #1
0
    //запуск корутины движения
    public virtual void move(NetworkStreetPath path)
    {
        if (StepsInJail == 0)
        {
            if (!isMoving && !corutine)
            {
                corutine = true;
                way      = _dbWork.GetWay(currentStreetPath.GetIdStreetPath(),
                                          path.GetIdStreetPath());
                if (currentSteps + way.Count > maxSteps && !isGonnaBeCathced && !alreadyCheat)
                {
                    NetworkGameController.aboutPlayer += "Игрок " + NickName + " пытается смухлевать" + "\n";
                    _gameCanvas.OpenWarningWindow(this);
                    isCheating = true;
                }

                _gameCanvas.OnOffSavedButtons();
                StartCoroutine(Go());
            }
        }
        else
        {
            _gameCanvas.ShowInfoAboutEvent("Вы заключены под стражу" + "\n" + "Осталось ходов: " + StepsInJail);
        }
    }
예제 #2
0
 //получить информацию об улице из бд
 public void TakeData(NetworkStreetPath 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;
 }
예제 #3
0
 public override void move(NetworkStreetPath path)
 {
     if (StepsInJail == 0)
     {
         if (!isMoving && !corutine)
         {
             corutine = true;
             way      = _dbWork.GetWay(currentStreetPath.GetIdStreetPath(),
                                       path.GetIdStreetPath());
             isCheating = true;
             _gameCanvas.OnOffSavedButtons();
             StartCoroutine(GoBot());
         }
     }
 }
예제 #4
0
 //обновить данные о части улицы
 public void updatePath(NetworkStreetPath path)
 {
     paths[path.GetIdStreetPath()] = path;
 }