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.
Public Member Functions | Protected Member Functions | Properties | List of all members
XSSLG.XSGridHelperEditMode Class Reference

the function to draw tile More...

Inheritance diagram for XSSLG.XSGridHelperEditMode:

Public Member Functions

virtual void Start ()
 
virtual XSTile AddXSTile (XSITileNode tileData)
 
virtual bool RemoveXSTileByWorldPos (Vector3 worldPos)
 
virtual void SetTileToNearTerrain ()
 Adjust the height of all tiles More...
 
virtual void ClearTiles ()
 
virtual void SetTilePosShow (bool isShow)
 show tile position text More...
 
virtual void SetTileCostShow (bool isShow)
 show tile cost text More...
 
virtual void Update ()
 

Protected Member Functions

virtual Transform GetUnitRoot ()
 
virtual Transform GetTileRoot ()
 
virtual bool SetTileToNearTerrain (XSTile tile, bool closeUnit)
 Each tile may have uneven obstacles in the center, adjust the height of the tile to the top of the obstacle For example, raise 100 from the center point of the tile, and then check whether there is a collision within 100. More...
 
virtual void SetTextShow (bool isShow, string rootName, Action< XSTile, TextMeshPro > afterCreateFn)
 Generate text to display for all tiles More...
 

Properties

Grid Grid [get, set]
 Monitor CellSize changes More...
 
Vector3 PrevTileSize = Vector3.zero [get, set]
 
bool IsShowTilePos [get]
 
bool IsShowTileCost [get]
 

Detailed Description

the function to draw tile

Member Function Documentation

◆ AddXSTile()

virtual XSTile XSSLG.XSGridHelperEditMode.AddXSTile ( XSITileNode  tileData)
inlinevirtual

◆ ClearTiles()

virtual void XSSLG.XSGridHelperEditMode.ClearTiles ( )
inlinevirtual

◆ GetTileRoot()

virtual Transform XSSLG.XSGridHelperEditMode.GetTileRoot ( )
protectedvirtual

◆ GetUnitRoot()

virtual Transform XSSLG.XSGridHelperEditMode.GetUnitRoot ( )
protectedvirtual

◆ RemoveXSTileByWorldPos()

virtual bool XSSLG.XSGridHelperEditMode.RemoveXSTileByWorldPos ( Vector3  worldPos)
inlinevirtual

◆ SetTextShow()

virtual void XSSLG.XSGridHelperEditMode.SetTextShow ( bool  isShow,
string  rootName,
Action< XSTile, TextMeshPro >  afterCreateFn 
)
inlineprotectedvirtual

Generate text to display for all tiles

Parameters
isShow
rootName
afterCreateFnCallback after generation

◆ SetTileCostShow()

virtual void XSSLG.XSGridHelperEditMode.SetTileCostShow ( bool  isShow)
inlinevirtual

show tile cost text

Parameters
isShow

◆ SetTilePosShow()

virtual void XSSLG.XSGridHelperEditMode.SetTilePosShow ( bool  isShow)
inlinevirtual

show tile position text

Parameters
isShow

◆ SetTileToNearTerrain() [1/2]

virtual void XSSLG.XSGridHelperEditMode.SetTileToNearTerrain ( )
inlinevirtual

Adjust the height of all tiles

◆ SetTileToNearTerrain() [2/2]

virtual bool XSSLG.XSGridHelperEditMode.SetTileToNearTerrain ( XSTile  tile,
bool  closeUnit 
)
inlineprotectedvirtual

Each tile may have uneven obstacles in the center, adjust the height of the tile to the top of the obstacle For example, raise 100 from the center point of the tile, and then check whether there is a collision within 100.

If it hits, set the height of the tile to the position of the collision point.

◆ Start()

virtual void XSSLG.XSGridHelperEditMode.Start ( )
inlinevirtual

◆ Update()

virtual void XSSLG.XSGridHelperEditMode.Update ( )
inlinevirtual

Property Documentation

◆ Grid

Grid XSSLG.XSGridHelperEditMode.Grid
getsetprivate

Monitor CellSize changes

◆ IsShowTileCost

bool XSSLG.XSGridHelperEditMode.IsShowTileCost
get

◆ IsShowTilePos

bool XSSLG.XSGridHelperEditMode.IsShowTilePos
get

◆ PrevTileSize

Vector3 XSSLG.XSGridHelperEditMode.PrevTileSize = Vector3.zero
getsetprotected

The documentation for this class was generated from the following file: