public void CleanFloorHUD() { if (floorHUD != null) { floorHUD.Release(); floorHUD = null; } }
private void OnDestroy() { if (floorHUD != null) { floorHUD.Release(); } floorHUD = null; }
public void CancelSkill() { if (floorHUD != null) { floorHUD.Release(); floorHUD = null; } target = null; }
/// <summary> /// 释放技能 /// </summary> public void PerformSkill() { if (floorHUD != null) { floorHUD.Release(); floorHUD = null; } if (target != null) { AIChess.skill.Perform(); } StartCoroutine(GridFunctionUtility.InvokeAfter(AIManager.instance.MoveNext, 1f)); }
/// <summary> /// 显示技能范围 /// </summary> public void PrepareSkill() { if (target != null) { (actor as GChess).FaceToward((target.location - actor.location).Normalized()); floorHUD = new FloorHUD(GetSkill().GetAffectRange, new Color(1, 0, 0, 0.8f)); } else { Debug.Log("Target Miss"); } StartCoroutine(GridFunctionUtility.InvokeAfter(AIManager.instance.MoveNext, 0.5f)); }
private void Start() { hud = new FloorHUD(() => { List <Vector2Int> res = GridManager.instance.GetRayRange(actor.location, targetLocation); if (res != null) { return(res.ToArray()); } else { return(new Vector2Int[0]); } }, Color.yellow); PlayerControlManager.instance.eOverTile.AddListener(ChangeHUD); }
public void CreateFloorHUD(Color color) { floorHUD = new FloorHUD(GetRange, color); eTaskEnd.AddListener(CleanFloorHUD); }