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

Common unity methods More...

Static Public Member Functions

static XSTile GetMouseTargetTile (Camera camera)
 Get the tile the mouse is pointing at More...
 
static XSTile GetMouseTargetTile ()
 
static XSIUnitNode GetMouseTargetUnit (Camera camera)
 Get the unit the mouse is pointing at More...
 
static XSIUnitNode GetMouseTargetUnit ()
 
static void CameraMoveTo (Vector3 worldPos)
 摄像机以一定速度移动到指定位置 More...
 
static void CameraSetPosTo (Vector3 worldPos)
 摄像机移动到指定位置 More...
 
static void CameraCanFreeMove (bool val)
 摄像机移动到指定位置 More...
 
static void ShowDamageText (string damage, Transform transform)
 
static GameScene GetGameScene ()
 获取GameScene对象 More...
 
static BattleLogic GetBattleLogic ()
 获取BattleLogic对象 More...
 
static BattleNode GetBattleNode ()
 挂场景节点的组件 More...
 
static bool IsEditor ()
 is it in unity editor mode More...
 
static XSGridMain GetGridMain ()
 
static void ClearFlag (ref int x, int flag)
 清除标记 More...
 
static void SetFlag (ref int x, int flag)
 添加标记 More...
 
static bool GetFlag (ref int x, int flag)
 判断是否有标记 More...
 
static Quaternion RotationTo (Vector3 src, Vector3 dest)
 从 src 到 dest 坐标的旋转 More...
 
static Vector3 WorldPosToScreenPos (Vector3 worldPos, Camera camera=null)
 世界坐标转为屏幕坐标 More...
 
static Camera GetMainCamera ()
 Returns the first Camera in the scene, the name is SceneCamera is the system (it is not clear what it is used for), not the general camera in the scene More...
 
static RaycastHit GetMouseHit (Vector2 screenPos)
 
static void ActionChildren (GameObject obj, Action< GameObject > action)
 action all chilren More...
 
static void RemoveChildren (GameObject obj)
 remove all children More...
 
static void RemoveObj (GameObject obj)
 
static TextMeshPro CreateTextMesh (Vector2 size, Transform parent)
 Generate a textmeshpro font node that fits the size, the default font used temporarily More...
 
static List< GameObject > LoadGameObjAtPath< T > (string[] pathArray, string filter)
 load the contents of the folder More...
 

Static Protected Member Functions

static RaycastHit GetMouseHit (Vector2 screenPos, string layerName, Camera camera)
 Get the object the mouse is pointing at More...
 
static RaycastHit GetMouseHit (Vector2 screenPos, string layerName)
 

Static Protected Attributes

static XSGridMain gridMain
 

Properties

static UIMgr UIMgr [get]
 UI管理 More...
 
static XSIGridMgr GridMgr [get]
 
static XSGridHelper GridHelper [get]
 

Detailed Description

Common unity methods

Member Function Documentation

◆ ActionChildren()

static void XSSLG.XSU.ActionChildren ( GameObject  obj,
Action< GameObject >  action 
)
inlinestatic

action all chilren

Parameters
objparent gameobject

◆ CameraCanFreeMove()

static void XSSLG.XSU.CameraCanFreeMove ( bool  val)
static

摄像机移动到指定位置

Parameters
worldPos

◆ CameraMoveTo()

static void XSSLG.XSU.CameraMoveTo ( Vector3  worldPos)
static

摄像机以一定速度移动到指定位置

Parameters
worldPos

◆ CameraSetPosTo()

static void XSSLG.XSU.CameraSetPosTo ( Vector3  worldPos)
static

摄像机移动到指定位置

Parameters
worldPos

◆ ClearFlag()

static void XSSLG.XSU.ClearFlag ( ref int  x,
int  flag 
)
inlinestatic

清除标记

Parameters
x存所有标记的值
flag要清除的标记

◆ CreateTextMesh()

static TextMeshPro XSSLG.XSU.CreateTextMesh ( Vector2  size,
Transform  parent 
)
inlinestatic

Generate a textmeshpro font node that fits the size, the default font used temporarily

Parameters
size
Returns

◆ GetBattleLogic()

static BattleLogic XSSLG.XSU.GetBattleLogic ( )
static

获取BattleLogic对象

◆ GetBattleNode()

static BattleNode XSSLG.XSU.GetBattleNode ( )
static

挂场景节点的组件

◆ GetFlag()

static bool XSSLG.XSU.GetFlag ( ref int  x,
int  flag 
)
static

判断是否有标记

Parameters
x存所有标记的值
flag要判断的标记

◆ GetGameScene()

static GameScene XSSLG.XSU.GetGameScene ( )
static

获取GameScene对象

◆ GetGridMain()

static XSGridMain XSSLG.XSU.GetGridMain ( )
inlinestatic

◆ GetMainCamera()

static Camera XSSLG.XSU.GetMainCamera ( )
static

Returns the first Camera in the scene, the name is SceneCamera is the system (it is not clear what it is used for), not the general camera in the scene

Returns

◆ GetMouseHit() [1/3]

static RaycastHit XSSLG.XSU.GetMouseHit ( Vector2  screenPos)
static

◆ GetMouseHit() [2/3]

static RaycastHit XSSLG.XSU.GetMouseHit ( Vector2  screenPos,
string  layerName 
)
staticprotected

◆ GetMouseHit() [3/3]

static RaycastHit XSSLG.XSU.GetMouseHit ( Vector2  screenPos,
string  layerName,
Camera  camera 
)
inlinestaticprotected

Get the object the mouse is pointing at

Parameters
screenPos
layerNameWhich layer the mouse ray intersects with
cameraThe main view camera, if this parameter is not passed in, it will be set to the first found Camera component in the scene
Returns

◆ GetMouseTargetTile() [1/2]

static XSTile XSSLG.XSU.GetMouseTargetTile ( )
static

◆ GetMouseTargetTile() [2/2]

static XSTile XSSLG.XSU.GetMouseTargetTile ( Camera  camera)
inlinestatic

Get the tile the mouse is pointing at

Parameters
cameraThe main view camera, if this parameter is not passed in, it will be set to the first found Camera component in the scene
Returns

◆ GetMouseTargetUnit() [1/2]

static XSIUnitNode XSSLG.XSU.GetMouseTargetUnit ( )
static

◆ GetMouseTargetUnit() [2/2]

static XSIUnitNode XSSLG.XSU.GetMouseTargetUnit ( Camera  camera)
inlinestatic

Get the unit the mouse is pointing at

Parameters
cameraThe main view camera, if this parameter is not passed in, it will be set to the first found Camera component in the scene
Returns

◆ IsEditor()

static bool XSSLG.XSU.IsEditor ( )
static

is it in unity editor mode

◆ LoadGameObjAtPath< T >()

static List<GameObject> XSSLG.XSU.LoadGameObjAtPath< T > ( string[]  pathArray,
string  filter 
)
inlinestatic

load the contents of the folder

Parameters
pathArrayload folder path
filter
Template Parameters
TContains T type script
Returns

◆ RemoveChildren()

static void XSSLG.XSU.RemoveChildren ( GameObject  obj)
inlinestatic

remove all children

Parameters
objparent gameobject

◆ RemoveObj()

static void XSSLG.XSU.RemoveObj ( GameObject  obj)
inlinestatic

◆ RotationTo()

static Quaternion XSSLG.XSU.RotationTo ( Vector3  src,
Vector3  dest 
)
inlinestatic

从 src 到 dest 坐标的旋转

Parameters
src要旋转物体的坐标
dest要朝向目标的坐标
Returns
src 的 locationRotation 值

◆ SetFlag()

static void XSSLG.XSU.SetFlag ( ref int  x,
int  flag 
)
static

添加标记

Parameters
x存所有标记的值
flag要添加的标记

◆ ShowDamageText()

static void XSSLG.XSU.ShowDamageText ( string  damage,
Transform  transform 
)
inlinestatic

◆ WorldPosToScreenPos()

static Vector3 XSSLG.XSU.WorldPosToScreenPos ( Vector3  worldPos,
Camera  camera = null 
)
inlinestatic

世界坐标转为屏幕坐标

Parameters
worldPos世界坐标
camera主视角相机,如果不传入这个参数,则会设置为场景中第一个找到的Camera组件
Returns

Member Data Documentation

◆ gridMain

XSGridMain XSSLG.XSU.gridMain
staticprotected

Property Documentation

◆ GridHelper

XSGridHelper XSSLG.XSU.GridHelper
staticget

◆ GridMgr

XSIGridMgr XSSLG.XSU.GridMgr
staticget

◆ UIMgr

UIMgr XSSLG.XSU.UIMgr
staticget

UI管理


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