Common unity methods
More...
|
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 RaycastHit | GetMouseHit (Vector2 screenPos, string layerName, Camera camera) |
| Get the object the mouse is pointing at More...
|
|
static RaycastHit | GetMouseHit (Vector2 screenPos, string layerName) |
|
◆ ActionChildren()
static void XSSLG.XSU.ActionChildren |
( |
GameObject |
obj, |
|
|
Action< GameObject > |
action |
|
) |
| |
|
inlinestatic |
action all chilren
- Parameters
-
◆ CameraCanFreeMove()
static void XSSLG.XSU.CameraCanFreeMove |
( |
bool |
val | ) |
|
|
static |
◆ CameraMoveTo()
static void XSSLG.XSU.CameraMoveTo |
( |
Vector3 |
worldPos | ) |
|
|
static |
摄像机以一定速度移动到指定位置
- Parameters
-
◆ CameraSetPosTo()
static void XSSLG.XSU.CameraSetPosTo |
( |
Vector3 |
worldPos | ) |
|
|
static |
◆ ClearFlag()
static void XSSLG.XSU.ClearFlag |
( |
ref int |
x, |
|
|
int |
flag |
|
) |
| |
|
inlinestatic |
◆ 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
-
- Returns
◆ GetBattleLogic()
◆ GetBattleNode()
◆ GetFlag()
static bool XSSLG.XSU.GetFlag |
( |
ref int |
x, |
|
|
int |
flag |
|
) |
| |
|
static |
◆ GetGameScene()
◆ GetGridMain()
◆ 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 | |
layerName | Which layer the mouse ray intersects with |
camera | The 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
-
camera | The 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]
◆ GetMouseTargetUnit() [2/2]
static XSIUnitNode XSSLG.XSU.GetMouseTargetUnit |
( |
Camera |
camera | ) |
|
|
inlinestatic |
Get the unit the mouse is pointing at
- Parameters
-
camera | The 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
-
pathArray | load folder path |
filter | |
- Template Parameters
-
- Returns
◆ RemoveChildren()
static void XSSLG.XSU.RemoveChildren |
( |
GameObject |
obj | ) |
|
|
inlinestatic |
remove all children
- Parameters
-
◆ RemoveObj()
static void XSSLG.XSU.RemoveObj |
( |
GameObject |
obj | ) |
|
|
inlinestatic |
◆ RotationTo()
从 src 到 dest 坐标的旋转
- Parameters
-
- Returns
- src 的 locationRotation 值
◆ SetFlag()
static void XSSLG.XSU.SetFlag |
( |
ref int |
x, |
|
|
int |
flag |
|
) |
| |
|
static |
◆ 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
◆ gridMain
◆ GridHelper
◆ GridMgr
◆ UIMgr
The documentation for this class was generated from the following files:
- Assets/XSGridEditor/Scripts/base/battle/utils/XSUG.cs
- Assets/XSGridEditor/Scripts/base/utils/XSU.cs
- Assets/XSGridEditor/Scripts/grid/utils/XSUE.cs