void IPointerExitHandler.OnPointerExit(PointerEventData pointerData) { isHighlight = false; FindObjectOfType <UIManager>().DisableTileViewerUI(); if (IsUnitOnTile()) { ColorChainTilesByUnit.Hide(unitOnTile.GetComponent <Unit>()); } BattleManager battleManager = FindObjectOfType <BattleManager>(); BattleData battleData = battleManager.battleData; List <Unit> unitsTargetThisTile = battleData.GetUnitsTargetThisTile(this); foreach (Unit unit in unitsTargetThisTile) { unit.HideChainIcon(); } if (battleManager.IsLeftClicked()) { return; } FindObjectOfType <UIManager>().DisableUnitViewer(); if (isPreSeleted) { battleManager.OnMouseExitHandlerFromTile(position); } }
void IPointerEnterHandler.OnPointerEnter(PointerEventData pointerData) { isHighlight = true; BattleManager battleManager = FindObjectOfType <BattleManager>(); BattleData battleData = battleManager.battleData; if (IsUnitOnTile()) { ColorChainTilesByUnit.Show(unitOnTile.GetComponent <Unit>()); List <Unit> unitsTargetThisTile = battleData.GetUnitsTargetThisTile(this); foreach (Unit unit in unitsTargetThisTile) { unit.ShowChainIcon(); } if (battleManager.IsLeftClicked()) { return; } FindObjectOfType <UIManager>().UpdateUnitViewer(unitOnTile); } FindObjectOfType <UIManager>().SetTileViewer(gameObject); if (isPreSeleted) { battleManager.OnMouseEnterHandlerFromTile(position); } }