Nostalgia  2.1.5
TileColliderBase Class Referenceabstract

Base class of TileCollider More...

Inheritance diagram for TileColliderBase:
TileCollider< T >

Public Member Functions

virtual void GetPolygons (Vector2 cellPos, List< List< Vector2 >> polygons)
 Get polygons. More...
 
virtual bool IsUpdateCollider (Collider2D collider, Vector2 cellPos)
 Determines whether the need to update the collider In the inherited class, to determine the change of property to each other as needed. More...
 
Collider2D UpdateCollider (Collider2D collider, GameObject colliderObject, Vector2 pos, bool isCellObject, out bool changed)
 To update the Collider More...
 

Public Attributes

Vector2 offset = Vector2.zero
 Offset in the case where the center of the tile is set to 0 More...
 
PhysicsMaterial2D physicsMaterial
 PhysicsMaterial2D be set to Collider. More...
 
bool isTrigger = false
 Is Trigger be set to Collider. More...
 
bool isCombine = false
 Whether to combine Collider More...
 
bool isSplitMapCollider = true
 Whether to split MapCollider More...
 

Protected Member Functions

abstract System.Type GetRequireColliderType ()
 Get the type of request to Collider2D. More...
 
virtual bool UpdateColliderProperty (Collider2D collider)
 Method to update the property of Collider2D. More...
 

Properties

Tile tile [get]
 It is associated with tile More...
 

Detailed Description

Base class of TileCollider

If you want to inheritance be done from TileCollider class that corresponds to the generic.

Member Function Documentation

virtual void GetPolygons ( Vector2  cellPos,
List< List< Vector2 >>  polygons 
)
virtual

Get polygons.

For inherited classes, store polygons in the list if necessary.

Parameters
cellPosCell position
polygonsList containing polygons
abstract System.Type GetRequireColliderType ( )
protectedpure virtual

Get the type of request to Collider2D.

Returns
Type of Collider2D

Implemented in TileCollider< T >.

virtual bool IsUpdateCollider ( Collider2D  collider,
Vector2  cellPos 
)
virtual

Determines whether the need to update the collider In the inherited class, to determine the change of property to each other as needed.

Parameters
colliderCollider
cellPosCell position
Returns
If you need update true
Collider2D UpdateCollider ( Collider2D  collider,
GameObject  colliderObject,
Vector2  pos,
bool  isCellObject,
out bool  changed 
)

To update the Collider

Parameters
colliderCurrent Collider
colliderObjectGameObject to attach a Collider
posPosition
isCellObjectWhether CellObject
changedWhether changed
Returns
Updated Collider
virtual bool UpdateColliderProperty ( Collider2D  collider)
protectedvirtual

Method to update the property of Collider2D.

Thing in the inherited class to describe the process of updating the property as needed here.

Parameters
colliderCollider
Returns
Whether the update

Member Data Documentation

bool isCombine = false

Whether to combine Collider

bool isSplitMapCollider = true

Whether to split MapCollider

bool isTrigger = false

Is Trigger be set to Collider.

Vector2 offset = Vector2.zero

Offset in the case where the center of the tile is set to 0

PhysicsMaterial2D physicsMaterial

PhysicsMaterial2D be set to Collider.

Property Documentation

Tile tile
get

It is associated with tile