XSGridEditor
1.0.0
XSGridEditor is a lightweight square grid map system for 2D/3D SRPG games, and comes with a simple and easy-to-use grid editing function. It can be used as a beginning for you to create SRPG games.
|
tile management class, responsible for tile coordinate transformation, data and other functions More...
Public Member Functions | |
virtual List< XSTile > | GetAllTiles () |
virtual void | ClearAllTiles () |
XSGridMgr (XSITileRoot tileRoot, Vector3 cellSize) | |
virtual void | Init (XSGridHelper helper) |
virtual Vector3Int | WorldToTile (Vector3 worldPos) |
change world position to tile position More... | |
virtual Vector3 | WorldToTileCenterWorld (Vector3 worldPos) |
get the center position of the tile from a world position More... | |
virtual Vector3 | TileToTileCenterWorld (Vector3Int tilePos) |
virtual XSTile | AddXSTile (XSITileNode tileNode) |
add tile to dict More... | |
virtual bool | RemoveXSTileByWorldPos (Vector3 worldPos) |
remove tile from dict More... | |
virtual bool | HasXSTile (Vector3Int tilePos) |
virtual bool | HasXSTileByWorldPos (Vector3 worldPos) |
get tile from a world position More... | |
virtual XSTile | GetXSTile (Vector3Int tilePos) |
virtual XSTile | GetXSTileByWorldPos (Vector3 worldPos) |
virtual bool | TryGetXSTile (Vector3Int tilePos, out XSTile tile) |
virtual bool | TryGetXSTileByWorldPos (Vector3 worldPos, out XSTile tile) |
virtual void | UpdateTileSize (Vector3 tileSize) |
virtual Dictionary< Vector3Int, List< Vector3 > > | FindAllPath (XSTile srcTile, int moveRange) |
get all paths More... | |
virtual List< Vector3 > | FindPath (XSTile srcTile, XSTile destTile) |
Protected Member Functions | |
virtual void | CreateXSTileDict (XSGridHelper helper) |
Static Protected Attributes | |
static readonly Vector3Int[] | NearPosArray = { Vector3Int.left, Vector3Int.back, Vector3Int.right, Vector3Int.forward, } |
4 near tile to each tile for squre map More... | |
Properties | |
TileDict | TileDict = new TileDict() [get, set] |
key is tilepos, value is tile More... | |
XSITileRoot | TileRoot [get] |
tiles parent,we can change this gameobject position to move all tile s position More... | |
Vector3 | TileSize = Vector3.zero [get, set] |
used to calculate tilePos More... | |
tile management class, responsible for tile coordinate transformation, data and other functions
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Implements XSSLG.XSIGridMgr.
|
inlineprotectedvirtual |
|
virtual |
get all paths
srcTile | beginning tile |
moveRange | -1 or less than 0 means no limit to move range |
Implements XSSLG.XSIGridMgr.
Implements XSSLG.XSIGridMgr.
|
virtual |
Implements XSSLG.XSIGridMgr.
|
inlinevirtual |
Implements XSSLG.XSIGridMgr.
Implements XSSLG.XSIGridMgr.
|
virtual |
Implements XSSLG.XSIGridMgr.
|
virtual |
get tile from a world position
worldPos | unity`s world position |
Implements XSSLG.XSIGridMgr.
|
inlinevirtual |
Implements XSSLG.XSIGridMgr.
|
inlinevirtual |
|
inlinevirtual |
Implements XSSLG.XSIGridMgr.
|
inlinevirtual |
Implements XSSLG.XSIGridMgr.
|
inlinevirtual |
Implements XSSLG.XSIGridMgr.
|
inlinevirtual |
Implements XSSLG.XSIGridMgr.
|
inlinevirtual |
change world position to tile position
worldPos | unity`s world position |
Implements XSSLG.XSIGridMgr.
get the center position of the tile from a world position
worldPos | unity`s world position |
Implements XSSLG.XSIGridMgr.
|
staticprotected |
4 near tile to each tile for squre map
|
getprotected |
tiles parent,we can change this gameobject position to move all tile
s position
|
getsetprotected |
used to calculate tilePos