【战斗】拖拽上阵bug修复
parent
343904da80
commit
4ce60e0d56
|
|
@ -214,6 +214,7 @@ namespace Gameplay.Level
|
|||
{
|
||||
//TODO chenyq 需要添加到stringconfig
|
||||
UITipsManager.ShowTips("上阵人数达到上限!");
|
||||
_SendDragCancelEvent();
|
||||
return;
|
||||
}
|
||||
// 创建单位
|
||||
|
|
|
|||
|
|
@ -359,6 +359,11 @@ public class UITeamFightController : UIWindow
|
|||
rectTransform.localScale = new Vector3(1, 1, 1);
|
||||
m_fightItemList.Add(go);
|
||||
}
|
||||
|
||||
if (onFightList.Contains(TeamManager.Instance.SelectID))
|
||||
{
|
||||
RefreshFightSelect(TeamManager.Instance.SelectID);
|
||||
}
|
||||
}
|
||||
|
||||
/********************** 刷新左侧技能介绍界面 **********************/
|
||||
|
|
@ -417,7 +422,10 @@ public class UITeamFightController : UIWindow
|
|||
{
|
||||
if (gameUnit.gameunitType == EGameUnitType.Character || gameUnit.gameunitType == EGameUnitType.Vehicle)
|
||||
{
|
||||
LevelManager.Instance.CurrentLevel.SetSpeed(_originalSpeed);
|
||||
if (_originalSpeed > 0)
|
||||
{
|
||||
LevelManager.Instance.CurrentLevel.SetSpeed(_originalSpeed);
|
||||
}
|
||||
AreaManager.instance.readyAreaManager.ShowReadyArea();
|
||||
_originalSpeed = -1f;
|
||||
}
|
||||
|
|
@ -741,16 +749,38 @@ public class UITeamFightController : UIWindow
|
|||
{
|
||||
if (_dragingUid != 0)
|
||||
{
|
||||
var unit = GameUnitManager.instance.totalUnits.Search(_dragingUid);
|
||||
if (!isSuccess)
|
||||
{
|
||||
var unit = GameUnitManager.instance.totalUnits.Search(_dragingUid);
|
||||
if (unit != null)
|
||||
{
|
||||
unit.Node.GameObject.SetActive(false);
|
||||
}
|
||||
|
||||
TeamManager.Instance.SetSelectID();
|
||||
|
||||
}
|
||||
|
||||
if (unit != null)
|
||||
{
|
||||
var anim = unit.Node.transform.GetComponentInChildren<Animator>();
|
||||
if (anim != null)
|
||||
{
|
||||
anim.Play("ready");
|
||||
}
|
||||
|
||||
// if (LevelManager.Instance.CurrentLevel.IsInBattle())
|
||||
// {
|
||||
// var selectUnit = LevelManager.Instance.CurrentLevel.selectUnit;
|
||||
// if (selectUnit != null && _dragingUid == selectUnit.GetID())
|
||||
// {
|
||||
// var levelSelectID = selectUnit.GetID();
|
||||
// TeamManager.Instance.SetSelectID(levelSelectID);
|
||||
// SetSelectFightItem(levelSelectID);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
AreaManager.instance.readyAreaManager.HideReadyArea();
|
||||
_dragingUid = 0;
|
||||
}
|
||||
|
|
@ -822,7 +852,10 @@ public class UITeamFightController : UIWindow
|
|||
//播放动效前刷新已上阵列表按
|
||||
RefreshOnFightList();
|
||||
PlayFadeToFight(tempList, uid);
|
||||
LevelManager.Instance.CurrentLevel.SetSpeed(_originalSpeed);
|
||||
if (_originalSpeed > 0)
|
||||
{
|
||||
LevelManager.Instance.CurrentLevel.SetSpeed(_originalSpeed);
|
||||
}
|
||||
_originalSpeed = -1f;
|
||||
TeamManager.Instance.InVehicleRemove(uid);
|
||||
}
|
||||
|
|
@ -1333,6 +1366,11 @@ public class UITeamFightController : UIWindow
|
|||
var hitPoint = firstHit.point;
|
||||
|
||||
unit.Node.transform.position = hitPoint;
|
||||
var anim = unit.Node.transform.GetComponentInChildren<Animator>();
|
||||
if (anim != null)
|
||||
{
|
||||
anim.Play("move");
|
||||
}
|
||||
//unit.transData.pos = hitPoint;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue