Class ShapeLogic
- Namespace
- Root
- Assembly
- Game.Content.Features.dll
public static class ShapeLogic
- Inheritance
-
object
ShapeLogic
Methods
BuildGroups(List<ShapePartReference>, int)
public static List<ShapeLogic.ShapePartGroup> BuildGroups(List<ShapePartReference> references, int partCount)
Parameters
references List<ShapePartReference>
partCount int
Returns
- List<ShapeLogic.ShapePartGroup>
Collapse(List<ShapePartReference>, int, int, IShapeIdManager, List<HashSet<ShapePartReference>>)
public static ShapeCollapseResult Collapse(List<ShapePartReference> sourceReferences, int partCount, int maxShapeLayers, IShapeIdManager shapeIdManager, List<HashSet<ShapePartReference>> fuseGroups = null)
Parameters
sourceReferences List<ShapePartReference>
partCount int
maxShapeLayers int
shapeIdManager IShapeIdManager
fuseGroups List<HashSet<ShapePartReference>>
Returns
- ShapeCollapseResult
ComputeFusingResults(ref List<ShapePartGroup>, List<HashSet<ShapePartReference>>, List<ShapePartReference>, List<ShapePartReference>, int)
public static void ComputeFusingResults(ref List<ShapeLogic.ShapePartGroup> groups, List<HashSet<ShapePartReference>> fuseGroups, List<ShapePartReference> references, List<ShapePartReference> originalReferences, int partCount)
Parameters
groups List<ShapeLogic.ShapePartGroup>
fuseGroups List<HashSet<ShapePartReference>>
references List<ShapePartReference>
originalReferences List<ShapePartReference>
partCount int
Fold(IEnumerable<ShapePartReference>, int)
public static ShapeLayer[] Fold(IEnumerable<ShapePartReference> references, int partCount)
Parameters
references IEnumerable<ShapePartReference>
partCount int
Returns
- ShapeLayer[]
FoldAndConvert(IEnumerable<ShapePartReference>, int, IShapeIdManager)
public static ShapeId FoldAndConvert(IEnumerable<ShapePartReference> references, int partCount, IShapeIdManager shapeIdManager)
Parameters
references IEnumerable<ShapePartReference>
partCount int
shapeIdManager IShapeIdManager
Returns
- ShapeId
GetAllReferences(IEnumerable<ShapePartGroup>)
public static List<ShapePartReference> GetAllReferences(IEnumerable<ShapeLogic.ShapePartGroup> groups)
Parameters
groups IEnumerable<ShapeLogic.ShapePartGroup>
Returns
- List<ShapePartReference>
Logic_AllowFallDownByOne(ShapePartReference, ShapePartReference)
public static bool Logic_AllowFallDownByOne(ShapePartReference fallDown, ShapePartReference potentialBlocker)
Parameters
fallDown ShapePartReference
potentialBlocker ShapePartReference
Returns
- bool
Logic_IsConnected(ShapePartReference, ShapePartReference, int)
public static bool Logic_IsConnected(ShapePartReference a, ShapePartReference b, int partCount)
Parameters
a ShapePartReference
b ShapePartReference
partCount int
Returns
- bool
Logic_IsFused(ShapePartReference, ShapePartReference, int)
public static bool Logic_IsFused(ShapePartReference a, ShapePartReference b, int partCount)
Parameters
a ShapePartReference
b ShapePartReference
partCount int
Returns
- bool
MergeGroups(List<ShapePartGroup>)
public static void MergeGroups(List<ShapeLogic.ShapePartGroup> groups)
Parameters
groups List<ShapeLogic.ShapePartGroup>
RemoveExcessLayers(List<ShapePartGroup>, int)
public static void RemoveExcessLayers(List<ShapeLogic.ShapePartGroup> groups, int maxLayers)
Parameters
groups List<ShapeLogic.ShapePartGroup>
maxLayers int
SimulateFallDownPhysics(List<ShapePartGroup>, int)
public static void SimulateFallDownPhysics(List<ShapeLogic.ShapePartGroup> groups, int partCount)
Parameters
groups List<ShapeLogic.ShapePartGroup>
partCount int
SplitGroupIntoKeepAndVanish(ShapePartGroup, List<ShapePartReference>, List<ShapePartReference>, int)
public static IEnumerable<ShapeLogic.ShapePartGroup> SplitGroupIntoKeepAndVanish(ShapeLogic.ShapePartGroup group, List<ShapePartReference> keep, List<ShapePartReference> vanish, int partCount)
Parameters
group ShapeLogic.ShapePartGroup
keep List<ShapePartReference>
vanish List<ShapePartReference>
partCount int
Returns
- IEnumerable<ShapeLogic.ShapePartGroup>
Unfold(ShapeLayer[])
public static ShapeLogic.UnfoldResult Unfold(ShapeLayer[] layers)
Parameters
layers ShapeLayer[]
Returns
- ShapeLogic.UnfoldResult