Ejemplo n.º 1
0
    static void SyncNavMesh(ConstructionShop constructionShop)
    {
        Physics.SyncTransforms();
        var guo = new GraphUpdateObject(constructionShop.Bounds);

        AstarPath.active.UpdateGraphs(guo);
    }
Ejemplo n.º 2
0
    public void Build(ConstructionShop constructionShop)
    {
        transform.position = constructionShop.transform.position;
        transform.Rotate(Vector3.up, constructionShop.CurrentRotation);

        _firstDayProRata = RefManager.GameTime.TimeUntilPayday / GameTime.TimeInAGameDay;

        gameObject.SetActive(true);
        // Use the bounds of the shape to only update that area of our grid, for performance;
        SyncNavMesh(constructionShop);
    }