コード例 #1
0
ファイル: Cop.cs プロジェクト: Jake88/3DCopsAndRobbers
    static void SyncNavMesh(ConstructionShop constructionShop)
    {
        Physics.SyncTransforms();
        var guo = new GraphUpdateObject(constructionShop.Bounds);

        AstarPath.active.UpdateGraphs(guo);
    }
コード例 #2
0
ファイル: Cop.cs プロジェクト: Jake88/3DCopsAndRobbers
    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);
    }