UHSampleGame.CoreObjects.Units.Unit.Deploy C# (CSharp) Méthode

Deploy() public méthode

public Deploy ( Tile baseTile, Tile goalTile, int playerToAttack ) : void
baseTile UHSampleGame.TileSystem.Tile
goalTile UHSampleGame.TileSystem.Tile
playerToAttack int
Résultat void
        public void Deploy(Tile baseTile, Tile goalTile, int playerToAttack)
        {
            previousTileID = baseTile.ID;
            CurrentTileID = baseTile.ID;
            goalTileID = goalTile.ID;
            PlayerToAttack = playerToAttack;
               // this.previousTile = baseTile;
            //this.currentTile = baseTile;
            //this.goalTile = goalTile;
            this.Position = baseTile.Position;
            int count = 0;
            //lock (AStar2.tileInformationLock)
            lock(AStar2.locks[CurrentTileID][goalTile.ID])
            {
                while (count < 60)
                {
                    if (TileMap.Tiles[CurrentTileID].PathsInts[goalTile.ID].Count > 0)
                    {
                        SetFocalPointAndVelocity(TileMap.Tiles[CurrentTileID].PathsInts[goalTile.ID][1]);//currentTile.Paths[goalTile.ID][1]);
                        break;
                    }
                    count++;

                    if (count >= 60)
                    {
                        return;
                    }
                }

            }
            Status = UnitStatus.Deployed;
            UpdatePath();
            UpdateTransforms();
        }