C# Class Nez.Overlap2D.O2DMainItem

显示文件 Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
customVars string
itemIdentifier string
itemName string
layerDepth float
layerName string
originX float
originY float
renderLayer int
rotation float
scaleX float
scaleY float
tint Color
uniqueId int
x float
y float
zIndex int

Public Methods

Method Description
calculateLayerDepth ( float zIndexMax ) : float

helper to translate zIndex to layerDepth. zIndexMax should be at least equal to the highest zIndex

getCustomVarBool ( string key, bool defaultValue = true ) : bool
getCustomVarFloat ( string key, float defaultValue = 0f ) : float
getCustomVarInt ( string key, int defaultValue ) : int
getCustomVarString ( string key ) : string
getCustomVars ( ) : string>.Dictionary
orginForImageSize ( float width, float height ) : Vector2

translates the bottom-left based origin of Overlap2D to a top-left based origin

parseCustomVars ( ) : void

Method Details

calculateLayerDepth() public method

helper to translate zIndex to layerDepth. zIndexMax should be at least equal to the highest zIndex
public calculateLayerDepth ( float zIndexMax ) : float
zIndexMax float Z index max.
return float

getCustomVarBool() public method

public getCustomVarBool ( string key, bool defaultValue = true ) : bool
key string
defaultValue bool
return bool

getCustomVarFloat() public method

public getCustomVarFloat ( string key, float defaultValue = 0f ) : float
key string
defaultValue float
return float

getCustomVarInt() public method

public getCustomVarInt ( string key, int defaultValue ) : int
key string
defaultValue int
return int

getCustomVarString() public method

public getCustomVarString ( string key ) : string
key string
return string

getCustomVars() public method

public getCustomVars ( ) : string>.Dictionary
return string>.Dictionary

orginForImageSize() public method

translates the bottom-left based origin of Overlap2D to a top-left based origin
public orginForImageSize ( float width, float height ) : Vector2
width float Width.
height float Height.
return Vector2

parseCustomVars() public method

public parseCustomVars ( ) : void
return void

Property Details

customVars public_oe property

public string customVars
return string

itemIdentifier public_oe property

public string itemIdentifier
return string

itemName public_oe property

public string itemName
return string

layerDepth public_oe property

layerDepth is calculated by the Pipeline processor. It is derrived by getting the max zIndex and converting it to the MonoGame 0 - 1 range. If sorting issues arise the CompositeItemVO.calculateLayerDepthForChild method is where to look. The default value probably just needs to be increased a bit.
public float layerDepth
return float

layerName public_oe property

public string layerName
return string

originX public_oe property

public float originX
return float

originY public_oe property

public float originY
return float

renderLayer public_oe property

renderLayer is derived from the layer name set in Overlap2D. If the layer name contains an integer that value will be parsed and set.
public int renderLayer
return int

rotation public_oe property

public float rotation
return float

scaleX public_oe property

public float scaleX
return float

scaleY public_oe property

public float scaleY
return float

tint public_oe property

public Color tint
return Color

uniqueId public_oe property

public int uniqueId
return int

x public_oe property

public float x
return float

y public_oe property

public float y
return float

zIndex public_oe property

public int zIndex
return int