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 | Package Functions | Properties | List of all members
XSSLG.Unit Class Reference

战斗单位 More...

Inheritance diagram for XSSLG.Unit:
XSSLG.UnitBase XSSLG.XSINode XSSLG.AIUnit

Public Member Functions

 Unit (Role role, GroupType group, XSIUnitNode node)
 
bool WalkTo (XSTile tile)
 移动到指定位置 More...
 
void RemoveNode ()
 
bool IsNull ()
 You cannot use "==" to check gameobject is null, because the gameobject in Unity is override "==", but when the gameobject is converted to the XSITileRoot, it will not use the override "==" More...
 
- Public Member Functions inherited from XSSLG.UnitBase
Stat GetStat ()
 计算后的属性 More...
 
 UnitBase (Role role, GroupType group)
 
void Destroy ()
 结束生命周期 More...
 
virtual void SetActived ()
 
bool IsActived ()
 
void SetDead ()
 
bool IsDead ()
 
void SetAttacked ()
 
bool IsAttacked ()
 
void SetMoved ()
 
bool IsMoved ()
 
bool CanWalkThrough (UnitBase unit)
 能否穿过,敌人算墙,会影响行走路径 More...
 
List< Vector3GetMoveRegion ()
 get the unit move region More...
 
virtual void OnGameStart ()
 
virtual void OnTurnStart (SkillUpdateData data=null)
 
virtual void OnTurnEnd ()
 

Package Functions

void Die ()
 
- Package Functions inherited from XSSLG.UnitBase
void OnGameEnd ()
 

Properties

XSIUnitNode Node [get]
 unity的unit脚本 More...
 
override Vector3 WorldPos [get, set]
 
- Properties inherited from XSSLG.UnitBase
abstract Vector3 WorldPos [get, set]
 
Role Role [get]
 绑定的角色数据 More...
 
GroupType Group [get, protected set]
 势力 More...
 
NormalTable Table = new NormalTable() [get, private set]
 
Dictionary< Vector3Int, List< Vector3 > > CachedPaths [get, set]
 缓存的所有路径 More...
 
- Properties inherited from XSSLG.XSINode
Vector3 WorldPos [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from XSSLG.UnitBase
List< Vector3FindPath (XSTile tile)
 找到路径去指定位置 More...
 
- Protected Attributes inherited from XSSLG.UnitBase
int _flag = 0
 各种状态标记 More...
 

Detailed Description

战斗单位

Constructor & Destructor Documentation

◆ Unit()

XSSLG.Unit.Unit ( Role  role,
GroupType  group,
XSIUnitNode  node 
)
inline

Member Function Documentation

◆ Die()

void XSSLG.Unit.Die ( )
inlinepackage

◆ IsNull()

bool XSSLG.Unit.IsNull ( )
inline

You cannot use "==" to check gameobject is null, because the gameobject in Unity is override "==", but when the gameobject is converted to the XSITileRoot, it will not use the override "=="

Implements XSSLG.XSINode.

◆ RemoveNode()

void XSSLG.Unit.RemoveNode ( )

Implements XSSLG.XSINode.

◆ WalkTo()

bool XSSLG.Unit.WalkTo ( XSTile  tile)
inline

移动到指定位置

Parameters
path移动路径

Property Documentation

◆ Node

XSIUnitNode XSSLG.Unit.Node
get

unity的unit脚本

◆ WorldPos

override Vector3 XSSLG.Unit.WorldPos
getset

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