Example #1
0
 public void CleanFloorHUD()
 {
     if (floorHUD != null)
     {
         floorHUD.Release();
         floorHUD = null;
     }
 }
Example #2
0
 private void OnDestroy()
 {
     if (floorHUD != null)
     {
         floorHUD.Release();
     }
     floorHUD = null;
 }
Example #3
0
 public void CancelSkill()
 {
     if (floorHUD != null)
     {
         floorHUD.Release();
         floorHUD = null;
     }
     target = null;
 }
Example #4
0
 /// <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));
 }
Example #5
0
 /// <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));
 }
Example #6
0
 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);
 }
Example #7
0
 public void CreateFloorHUD(Color color)
 {
     floorHUD = new FloorHUD(GetRange, color);
     eTaskEnd.AddListener(CleanFloorHUD);
 }