public PathGraph(CellInfoLayerPool layerPool, MobileInfo mobileInfo, Actor actor, World world, bool checkForBlocked) { pooledLayer = layerPool.Get(); cellInfo = pooledLayer.Layer; World = world; this.mobileInfo = mobileInfo; worldMovementInfo = mobileInfo.GetWorldMovementInfo(world); Actor = actor; LaneBias = 1; checkConditions = checkForBlocked ? CellConditions.TransientActors : CellConditions.None; }
public PathGraph(CellInfoLayerPool layerPool, MobileInfo mobileInfo, Actor actor, World world, bool checkForBlocked) { pooledLayer = layerPool.Get(); groundInfo = pooledLayer.GetLayer(); var layers = world.GetCustomMovementLayers().Values.Where(cml => cml.EnabledForActor(actor.Info, mobileInfo)); foreach (var cml in layers) { customLayerInfo[cml.Index] = Pair.New(cml, pooledLayer.GetLayer()); } World = world; this.mobileInfo = mobileInfo; worldMovementInfo = mobileInfo.GetWorldMovementInfo(world); Actor = actor; LaneBias = 1; checkConditions = checkForBlocked ? CellConditions.TransientActors:CellConditions.None; checkTerrainHeight = world.Map.Grid.MaximumTerrainHeight > 0; }