C# Класс tk2dTileMap, Malisse

Наследование: MonoBehaviour, ISpriteCollectionForceBuild
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
buildKey int
data tk2dTileMapData,
editorDataGUID string
height int
partitionSizeX int
partitionSizeY int
renderData GameObject
serializeRenderData bool
serializedMeshPath string
width int

Открытые методы

Метод Описание
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

Описание методов

AreSpritesInitialized() публичный Метод

public AreSpritesInitialized ( ) : bool
Результат bool

Awake() публичный Метод

public Awake ( ) : void
Результат void

BeginEditMode() публичный Метод

public BeginEditMode ( ) : void
Результат void

Build() публичный Метод

public Build ( ) : void
Результат void

Build() публичный Метод

public Build ( BuildFlags buildFlags ) : void
buildFlags BuildFlags
Результат void

ClearSpawnedInstances() публичный Метод

public ClearSpawnedInstances ( ) : void
Результат void

CreateColorChannel() публичный Метод

public CreateColorChannel ( ) : void
Результат void

DeleteColorChannel() публичный Метод

public DeleteColorChannel ( ) : void
Результат void

DeleteSprites() публичный Метод

public DeleteSprites ( int layerId, int x0, int y0, int x1, int y1 ) : void
layerId int
x0 int
y0 int
x1 int
y1 int
Результат void

DestroyMesh() публичный Метод

public DestroyMesh ( Mesh mesh ) : void
mesh Mesh
Результат void

EndEditMode() публичный Метод

public EndEditMode ( ) : void
Результат void

ForceBuild() публичный Метод

public ForceBuild ( ) : void
Результат void

GetInterpolatedColorAtPosition() публичный Метод

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
Результат Color

GetOrCreateMesh() публичный Метод

public GetOrCreateMesh ( ) : Mesh
Результат Mesh

GetTileAtPosition() публичный Метод

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
Результат bool

GetTileFracAtPosition() публичный Метод

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
Результат bool

GetTileIdAtPosition() публичный Метод

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
Результат int

GetTileInfoForTileId() публичный Метод

Returns the tile info chunk for the tile. Use this to store additional metadata
public GetTileInfoForTileId ( int tileId ) : TileInfo
tileId int
Результат tk2dRuntime.TileMap.TileInfo

GetTilePosition() публичный Метод

Returns the tile position in world space
public GetTilePosition ( int x, int y ) : Vector3
x int
y int
Результат Vector3

HasColorChannel() публичный Метод

public HasColorChannel ( ) : bool
Результат bool

TouchMesh() публичный Метод

public TouchMesh ( Mesh mesh ) : void
mesh Mesh
Результат void

UsesSpriteCollection() публичный Метод

public UsesSpriteCollection ( tk2dSpriteCollectionData, spriteCollection ) : bool
spriteCollection tk2dSpriteCollectionData,
Результат bool

Описание свойств

buildKey публичное свойство

public int buildKey
Результат int

data публичное свойство

Tile map data, stores shared parameters for tilemaps
public tk2dTileMapData, data
Результат tk2dTileMapData,

editorDataGUID публичное свойство

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
Результат string

height публичное свойство

Height of the tilemap
public int height
Результат int

partitionSizeX публичное свойство

X axis partition size for this tilemap
public int partitionSizeX
Результат int

partitionSizeY публичное свойство

Y axis partition size for this tilemap
public int partitionSizeY
Результат int

renderData публичное свойство

Tile map render and collider object
public GameObject renderData
Результат GameObject

serializeRenderData публичное свойство

public bool serializeRenderData
Результат bool

serializedMeshPath публичное свойство

public string serializedMeshPath
Результат string

width публичное свойство

Width of the tilemap
public int width
Результат int