public void Generate(DayLightColliderShape shape) { float height = shape.height; if (shape.shadowType == DayLightCollider2D.ShadowType.SpriteOffset) { return; } if (shape.shadowType == DayLightCollider2D.ShadowType.SpriteProjection) { return; } Clear(); List <Polygon2> polys = shape.GetPolygonsLocal(); if (polys == null) { return; } if (meshBrush == null) { meshBrush = new MeshBrush(); } float sunHeight = Lighting2D.DayLightingSettings.height; GenerateFill(shape.transform, shape, height * sunHeight); bool softness = Lighting2D.DayLightingSettings.softness.enable; if (softness) { GenerateSoftness(); } }
public void Generate(DayLightingTile tile) { float height = tile.height; Clear(); if (meshBrush == null) { meshBrush = new MeshBrush(); } float sunHeight = Lighting2D.DayLightingSettings.height; GenerateFill(tile, height * sunHeight); bool softness = Lighting2D.DayLightingSettings.softness.enable; if (softness) { GenerateSoftness(); } }
public SpriteTiledMesh() { brush = new MeshBrush(); spriteMesh = new SpriteMesh(); }