C# Class Nez.Overlap2D.O2DCompositeItem

Inheritance: O2DMainItem
Datei anzeigen Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
composite O2DComposite

Public Methods

Method Description
layerDepthForChild ( float zIndexMaxComp, O2DMainItem child, float zIndexMaxChild = 100 ) : float

gets the layerDepth for a child composite. It calculates it by first getting the composite (parent) layerDepth the standard way (via zIndexMaxComp) and then subtracting the inverse of the child (O2DMainItem) layerDepth which uses zIndexMaxChild. For this to work intelligently zIndexMaxComp should be the standard scene.zIndexMax value and zIndexMaxChild should be a much higher number. The reason for this is so that the parent component has a small offset to use for each child and so they dont overflow to the next zIndex. Example: parent is 14. Any children must end up being between 14 and 15 so they dont overflow on top of another composite.

Method Details

layerDepthForChild() public method

gets the layerDepth for a child composite. It calculates it by first getting the composite (parent) layerDepth the standard way (via zIndexMaxComp) and then subtracting the inverse of the child (O2DMainItem) layerDepth which uses zIndexMaxChild. For this to work intelligently zIndexMaxComp should be the standard scene.zIndexMax value and zIndexMaxChild should be a much higher number. The reason for this is so that the parent component has a small offset to use for each child and so they dont overflow to the next zIndex. Example: parent is 14. Any children must end up being between 14 and 15 so they dont overflow on top of another composite.
public layerDepthForChild ( float zIndexMaxComp, O2DMainItem child, float zIndexMaxChild = 100 ) : float
zIndexMaxComp float Z index max comp.
child O2DMainItem Child.
zIndexMaxChild float Z index max child.
return float

Property Details

composite public_oe property

public O2DComposite,Nez.Overlap2D composite
return O2DComposite