|
@@ -3,6 +3,7 @@ using Common.Utility.CombatTimer;
|
|
|
using Fort23.Core;
|
|
|
using Fort23.UTool;
|
|
|
using GameLogic.Combat.CombatTool;
|
|
|
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
|
|
|
using UnityEngine;
|
|
|
|
|
|
namespace Fort23.Mono
|
|
@@ -26,29 +27,32 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
}
|
|
|
|
|
|
- public void ShowUI(CombatHeroEntity heroEntity,long att , HarmType harmType, bool isHarm)
|
|
|
+ public void ShowUI(CombatHeroEntity heroEntity, long att, HarmType harmType, bool isHarm)
|
|
|
{
|
|
|
- Vector3 worldPos =heroEntity.combatHeroGameObject.hpTransform.position;
|
|
|
+ Vector3 worldPos = heroEntity.combatHeroGameObject.hpTransform.position;
|
|
|
Vector3 p = UIManager.Instance.CurrCustomCameraStack.camera.WorldToScreenPoint(worldPos);
|
|
|
Vector3 p2 = UIManager.Instance.UICamera.ScreenToWorldPoint(p);
|
|
|
transform.position = p2;
|
|
|
string playName = "show";
|
|
|
- switch (harmType)
|
|
|
+ if (harmType.HasFlag(HarmType.Shields))
|
|
|
{
|
|
|
- case HarmType.Default:
|
|
|
- text.color=Color.red;
|
|
|
- break;
|
|
|
- case HarmType.Shields:
|
|
|
- text.color=Color.cyan;
|
|
|
- break;
|
|
|
- case HarmType.Buff:
|
|
|
- playName = "buffshow";
|
|
|
- text.color=Color.white;
|
|
|
- break;
|
|
|
- case HarmType.Recover:
|
|
|
- text.color=Color.green;
|
|
|
- break;
|
|
|
+ text.color = Color.cyan;
|
|
|
}
|
|
|
+ else if (harmType.HasFlag(HarmType.Buff))
|
|
|
+ {
|
|
|
+ playName = "buffshow";
|
|
|
+ text.color = Color.white;
|
|
|
+ }
|
|
|
+ else if (harmType.HasFlag(HarmType.Recover))
|
|
|
+ {
|
|
|
+ text.color = Color.green;
|
|
|
+ }
|
|
|
+ else if (harmType.HasFlag(HarmType.Default))
|
|
|
+ {
|
|
|
+ text.color = Color.red;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// if (isHarm)
|
|
|
// {
|
|
|
// text.color=heroEntity.IsEnemy?Color.white:Color.red;
|
|
@@ -59,7 +63,7 @@ namespace Fort23.Mono
|
|
|
// }
|
|
|
|
|
|
text.text = att.ToString();
|
|
|
- anim.Play(playName,false);
|
|
|
+ anim.Play(playName, false);
|
|
|
// if (Animator != null)
|
|
|
// {
|
|
|
// if (harmType.HasFlag(HarmType.BaoJi))
|
|
@@ -72,10 +76,7 @@ namespace Fort23.Mono
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
- CombatTimerManager.Instance.AddTimer(1, delegate
|
|
|
- {
|
|
|
- GObjectPool.Instance.Recycle(this);
|
|
|
- });
|
|
|
+ CombatTimerManager.Instance.AddTimer(1, delegate { GObjectPool.Instance.Recycle(this); });
|
|
|
}
|
|
|
}
|
|
|
}
|