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 Attributes | Properties | Private Attributes | List of all members
XSSLG.XSGridHelper Class Reference

Auxiliary class More...

Inheritance diagram for XSSLG.XSGridHelper:

Public Member Functions

List< XSITileNodeGetTileNodeList ()
 get all XSITileNode More...
 
List< XSIUnitNodeGetUnitNodeList ()
 get all XSUnitNode More...
 
virtual Bounds GetBounds ()
 
virtual bool SetTransToTopTerrain (Transform objTransform, bool closeUnit)
 Adjust the height of the objTransform to the top of the obstacle. More...
 

Protected Attributes

Transform tileRoot
 
int tileOffYMax = 1
 The maximum height offset between two near tiles, greater than this value means that the tile is not connected More...
 
float Precision = 0.01f
 The raised height of the tile relative to other objects to prevent overlapping and causing display problems More...
 
float TopDistance = 10f
 height of raycast More...
 

Properties

Transform TileRoot [get]
 
Transform UnitRoot [get]
 
GameObject MoveTilePrefab [get]
 
GameObject AttackTilePrefab [get]
 
GameObject AttackEffectTilePrefab [get]
 
int TileOffYMax [get]
 

Private Attributes

Transform unitRoot
 
GameObject moveTilePrefab
 prefab for moving range More...
 
GameObject attackTilePrefab
 prefab for attack range More...
 
GameObject attackEffectTilePrefab
 prefab for attack effect range More...
 

Detailed Description

Auxiliary class

Member Function Documentation

◆ GetBounds()

virtual Bounds XSSLG.XSGridHelper.GetBounds ( )
inlinevirtual

◆ GetTileNodeList()

List<XSITileNode> XSSLG.XSGridHelper.GetTileNodeList ( )

get all XSITileNode

◆ GetUnitNodeList()

List<XSIUnitNode> XSSLG.XSGridHelper.GetUnitNodeList ( )

get all XSUnitNode

◆ SetTransToTopTerrain()

virtual bool XSSLG.XSGridHelper.SetTransToTopTerrain ( Transform  objTransform,
bool  closeUnit 
)
inlinevirtual

Adjust the height of the objTransform to the top of the obstacle.

Raise the center point of objTransform by 100, and then check if there is a collision within 100. If it hits, set the height of objTransform to the position of the collision point tips:During the game, the entire scene will have a large boxcollider as the camera movement range. This collider needs to be excluded, so the height is set to 10 (lower)

Member Data Documentation

◆ attackEffectTilePrefab

GameObject XSSLG.XSGridHelper.attackEffectTilePrefab
private

prefab for attack effect range

◆ attackTilePrefab

GameObject XSSLG.XSGridHelper.attackTilePrefab
private

prefab for attack range

◆ moveTilePrefab

GameObject XSSLG.XSGridHelper.moveTilePrefab
private

prefab for moving range

◆ Precision

float XSSLG.XSGridHelper.Precision = 0.01f
protected

The raised height of the tile relative to other objects to prevent overlapping and causing display problems

◆ tileOffYMax

int XSSLG.XSGridHelper.tileOffYMax = 1
protected

The maximum height offset between two near tiles, greater than this value means that the tile is not connected

◆ tileRoot

Transform XSSLG.XSGridHelper.tileRoot
protected

◆ TopDistance

float XSSLG.XSGridHelper.TopDistance = 10f
protected

height of raycast

◆ unitRoot

Transform XSSLG.XSGridHelper.unitRoot
private

Property Documentation

◆ AttackEffectTilePrefab

GameObject XSSLG.XSGridHelper.AttackEffectTilePrefab
get

◆ AttackTilePrefab

GameObject XSSLG.XSGridHelper.AttackTilePrefab
get

◆ MoveTilePrefab

GameObject XSSLG.XSGridHelper.MoveTilePrefab
get

◆ TileOffYMax

int XSSLG.XSGridHelper.TileOffYMax
get

◆ TileRoot

Transform XSSLG.XSGridHelper.TileRoot
get

◆ UnitRoot

Transform XSSLG.XSGridHelper.UnitRoot
get

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