C# Class tk2dTileMap, Malisse

Inheritance: MonoBehaviour, ISpriteCollectionForceBuild
Show file Open project: Collegiennes/Malisse Class Usage Examples

Public Properties

Property Type Description
buildKey int
data tk2dTileMapData,
editorDataGUID string
height int
partitionSizeX int
partitionSizeY int
renderData GameObject
serializeRenderData bool
serializedMeshPath string
width int

Public Methods

Method Description
AreSpritesInitialized ( ) : bool
Awake ( ) : void
BeginEditMode ( ) : void
Build ( ) : void
Build ( BuildFlags buildFlags ) : void
ClearSpawnedInstances ( ) : void
CreateColorChannel ( ) : void
DeleteColorChannel ( ) : void
DeleteSprites ( int layerId, int x0, int y0, int x1, int y1 ) : void
DestroyMesh ( Mesh mesh ) : void
EndEditMode ( ) : void
ForceBuild ( ) : void
GetInterpolatedColorAtPosition ( Vector3 position ) : Color

Gets the tile at position. This can be used to obtain tile data, etc -1 = no data or empty tile

GetOrCreateMesh ( ) : Mesh
GetTileAtPosition ( Vector3 position, int &x, int &y ) : bool

Gets the tile coordinate at position. This can be used to obtain tile or color data explicitly from layers Returns true if the position is within the tilemap bounds

GetTileFracAtPosition ( Vector3 position, float &x, float &y ) : bool

Gets the tile coordinate at position. This can be used to obtain tile or color data explicitly from layers The fractional value returned is the fraction into the current tile Returns true if the position is within the tilemap bounds

GetTileIdAtPosition ( Vector3 position, int layer ) : int

Gets the tile at position. This can be used to obtain tile data, etc -1 = no data or empty tile

GetTileInfoForTileId ( int tileId ) : TileInfo

Returns the tile info chunk for the tile. Use this to store additional metadata

GetTilePosition ( int x, int y ) : Vector3

Returns the tile position in world space

HasColorChannel ( ) : bool
TouchMesh ( Mesh mesh ) : void
UsesSpriteCollection ( tk2dSpriteCollectionData, spriteCollection ) : bool

Method Details

AreSpritesInitialized() public method

public AreSpritesInitialized ( ) : bool
return bool

Awake() public method

public Awake ( ) : void
return void

BeginEditMode() public method

public BeginEditMode ( ) : void
return void

Build() public method

public Build ( ) : void
return void

Build() public method

public Build ( BuildFlags buildFlags ) : void
buildFlags BuildFlags
return void

ClearSpawnedInstances() public method

public ClearSpawnedInstances ( ) : void
return void

CreateColorChannel() public method

public CreateColorChannel ( ) : void
return void

DeleteColorChannel() public method

public DeleteColorChannel ( ) : void
return void

DeleteSprites() public method

public DeleteSprites ( int layerId, int x0, int y0, int x1, int y1 ) : void
layerId int
x0 int
y0 int
x1 int
y1 int
return void

DestroyMesh() public method

public DestroyMesh ( Mesh mesh ) : void
mesh Mesh
return void

EndEditMode() public method

public EndEditMode ( ) : void
return void

ForceBuild() public method

public ForceBuild ( ) : void
return void

GetInterpolatedColorAtPosition() public method

Gets the tile at position. This can be used to obtain tile data, etc -1 = no data or empty tile
public GetInterpolatedColorAtPosition ( Vector3 position ) : Color
position Vector3
return Color

GetOrCreateMesh() public method

public GetOrCreateMesh ( ) : Mesh
return Mesh

GetTileAtPosition() public method

Gets the tile coordinate at position. This can be used to obtain tile or color data explicitly from layers Returns true if the position is within the tilemap bounds
public GetTileAtPosition ( Vector3 position, int &x, int &y ) : bool
position Vector3
x int
y int
return bool

GetTileFracAtPosition() public method

Gets the tile coordinate at position. This can be used to obtain tile or color data explicitly from layers The fractional value returned is the fraction into the current tile Returns true if the position is within the tilemap bounds
public GetTileFracAtPosition ( Vector3 position, float &x, float &y ) : bool
position Vector3
x float
y float
return bool

GetTileIdAtPosition() public method

Gets the tile at position. This can be used to obtain tile data, etc -1 = no data or empty tile
public GetTileIdAtPosition ( Vector3 position, int layer ) : int
position Vector3
layer int
return int

GetTileInfoForTileId() public method

Returns the tile info chunk for the tile. Use this to store additional metadata
public GetTileInfoForTileId ( int tileId ) : TileInfo
tileId int
return tk2dRuntime.TileMap.TileInfo

GetTilePosition() public method

Returns the tile position in world space
public GetTilePosition ( int x, int y ) : Vector3
x int
y int
return Vector3

HasColorChannel() public method

public HasColorChannel ( ) : bool
return bool

TouchMesh() public method

public TouchMesh ( Mesh mesh ) : void
mesh Mesh
return void

UsesSpriteCollection() public method

public UsesSpriteCollection ( tk2dSpriteCollectionData, spriteCollection ) : bool
spriteCollection tk2dSpriteCollectionData,
return bool

Property Details

buildKey public property

public int buildKey
return int

data public property

Tile map data, stores shared parameters for tilemaps
public tk2dTileMapData, data
return tk2dTileMapData,

editorDataGUID public property

This is a link to the editor data object (tk2dTileMapEditorData). It contains presets, and other data which isn't really relevant in game.
public string editorDataGUID
return string

height public property

Height of the tilemap
public int height
return int

partitionSizeX public property

X axis partition size for this tilemap
public int partitionSizeX
return int

partitionSizeY public property

Y axis partition size for this tilemap
public int partitionSizeY
return int

renderData public property

Tile map render and collider object
public GameObject renderData
return GameObject

serializeRenderData public property

public bool serializeRenderData
return bool

serializedMeshPath public property

public string serializedMeshPath
return string

width public property

Width of the tilemap
public int width
return int