Nostalgia  2.1.5
Tile Class Reference

Data of the tile. More...

Inheritance diagram for Tile:

Public Types

enum  Type { Normal, AutoFloorVX, AutoFloorWolf }
 Type of tile. More...
 

Public Member Functions

Object GetTileComponentObjectFromIndex (int index)
 Returns an Object of TileComponent from index. More...
 
TileComponent GetTileComponentFromIndex (int index)
 Returns a TileComponent from index. More...
 
Vector2 IndexToPos (int index, int x, int y, Point2 tilePos)
 Get the Texture position from the index of the part. More...
 
void SetTileCollider (System.Type classType)
 Sets the TileCollider More...
 
float GetPartsWidth ()
 Gets the width of the parts. More...
 
TileComponent AddComponent (System.Type type)
 Adds the TileComponent. More...
 
AddComponent< T > ()
 Adds the TileComponent. More...
 
TileComponent GetComponent (System.Type type)
 Gets the TileComponent. More...
 
GetComponent< T > ()
 Gets the TileComponent. More...
 
TileComponent[] GetComponents (System.Type type)
 Gets the TileComponents. More...
 
T[] GetComponents< T > ()
 Gets the TileComponents. More...
 
void GetComponents (System.Type type, List< TileComponent > results)
 Gets the TileComponents. More...
 
void GetComponents< T > (List< T > results)
 Gets the TileComponents. More...
 
void MoveComponent (int from, int to)
 Move the order of TileComponent. More...
 
void RemoveComponent (TileComponent component)
 Remove the TileComponent. More...
 
bool IsCombinationTile (Tile tile)
 Adjacent tile it is determined whether or not to Combining. More...
 
void Changed ()
 

Public Attributes

Type type
 Type of tile. More...
 
Vector2 position
 Upper left coordinates on the texture (pixels). More...
 
int size
 Width of one tile (pixels). More...
 
int width = 1
 width More...
 
int height = 1
 height More...
 
float uvShiftInside = 0.01f
 Texel value of how far the UV is shifted inside the tile. More...
 
int animation = 1
 
float animationFrameRate = 10.0f
 Animation frame rate. More...
 
Color color = Color.white
 Tile of color More...
 
string combinationGroupName
 Combination group name More...
 
CombinationSideFlags combinationSideFlags = CombinationSideFlags.All
 It controls the combination of each side. More...
 

Properties

TileSet tileSet [get]
 The tile set. More...
 
TileColliderBase tileCollider [get]
 Tile Collider. More...
 
Object tileColliderObj [get]
 Returns an Object of TileCollider. More...
 
bool collider [get]
 Presence or absence of the Collider. More...
 
PhysicsMaterial2D physicsMaterial [get]
 PhysicsMaterial2D be set to Collider. More...
 
bool isTrigger [get]
 Is Trigger be set to Collider. More...
 
int tileComponentCount [get]
 Returns the number of TileComponent More...
 

Detailed Description

Data of the tile.

Member Enumeration Documentation

enum Type
strong

Type of tile.

Enumerator
Normal 

The tiles usually not auto tile.

AutoFloorVX 

Auto tile compatible RPG Maker VX floor.

AutoFloorWolf 

Auto tile compatible WOLF RPG Editor.

Member Function Documentation

TileComponent AddComponent ( System.Type  type)

Adds the TileComponent.

Returns
TileComponent that have been added.
Parameters
typeType of the class you want to add.
T AddComponent< T > ( )

Adds the TileComponent.

Returns
TTileComponent that have been added.
Template Parameters
TClass of TileComponent to add.
Type Constraints
T :TileComponent 
void Changed ( )
TileComponent GetComponent ( System.Type  type)

Gets the TileComponent.

Returns
TileComponent.

The return value may be null if it was not.

Parameters
typeType of the class you want to get.
T GetComponent< T > ( )

Gets the TileComponent.

Returns
TileComponent.

The return value may be null if it was not.

Template Parameters
TClass of TileComponent you want to get.
Type Constraints
T :class 
TileComponent [] GetComponents ( System.Type  type)

Gets the TileComponents.

Returns
Array of TileComponent.
Parameters
typeType of the class you want to get.
void GetComponents ( System.Type  type,
List< TileComponent results 
)

Gets the TileComponents.

Parameters
typeType of the class you want to get.
resultsList to receive the results.
T [] GetComponents< T > ( )

Gets the TileComponents.

Returns
Array of TileComponent.
Template Parameters
TClass of TileComponent you want to get.
Type Constraints
T :class 
void GetComponents< T > ( List< T >  results)

Gets the TileComponents.

Template Parameters
TClass of TileComponent you want to get.
Parameters
resultsList to receive the results.
Type Constraints
T :class 
float GetPartsWidth ( )

Gets the width of the parts.

Returns
The parts width.
TileComponent GetTileComponentFromIndex ( int  index)

Returns a TileComponent from index.

Object GetTileComponentObjectFromIndex ( int  index)

Returns an Object of TileComponent from index.

Vector2 IndexToPos ( int  index,
int  x,
int  y,
Point2  tilePos 
)

Get the Texture position from the index of the part.

Returns
The texture position.
Parameters
indexIndex.
xThe x coordinate(between 0 and 1).
yThe y coordinate(between 0 and 1).
tilePosTile position
bool IsCombinationTile ( Tile  tile)

Adjacent tile it is determined whether or not to Combining.

Parameters
tileTile
void MoveComponent ( int  from,
int  to 
)

Move the order of TileComponent.

Parameters
fromIndex of the moving source.
toIndex of the destination.
void RemoveComponent ( TileComponent  component)

Remove the TileComponent.

Parameters
componentTileComponent you want to remove.
void SetTileCollider ( System.Type  classType)

Sets the TileCollider

Parameters
classTypeType of TileCollider

Member Data Documentation

int animation = 1

Number of frames to the frame animation.

The image of the animation, you must be arranged to the right from the coordinates that you specify in the Nostalgia.Tile.position.

float animationFrameRate = 10.0f

Animation frame rate.

If you specify a negative value to reverse playback.

Color color = Color.white

Tile of color

string combinationGroupName

Combination group name

If the tile of the same combinationGroupName is adjacent to combine. combinationGroupName does not bind to other than the same tile in the case of empty.

It controls the combination of each side.

int height = 1

height

Vector2 position

Upper left coordinates on the texture (pixels).

int size

Width of one tile (pixels).

Type type

Type of tile.

float uvShiftInside = 0.01f

Texel value of how far the UV is shifted inside the tile.


int width = 1

width

Property Documentation

bool collider
get

Presence or absence of the Collider.

bool isTrigger
get

Is Trigger be set to Collider.

PhysicsMaterial2D physicsMaterial
get

PhysicsMaterial2D be set to Collider.

TileColliderBase tileCollider
get

Tile Collider.

Object tileColliderObj
get

Returns an Object of TileCollider.

int tileComponentCount
get

Returns the number of TileComponent

TileSet tileSet
get

The tile set.