【战斗】提交战前准备人员上限导致的选择异常
parent
f900eac1ac
commit
9e077c1f72
|
|
@ -334,6 +334,7 @@ namespace Gameplay.Level
|
|||
{
|
||||
//TODO chenyq 需要添加到stringconfig
|
||||
_SendDragCancelEvent();
|
||||
LevelManager.Instance.CurrentLevel.UnSelectUnit();
|
||||
UITipsManager.ShowTips("上阵人数达到上限!");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ namespace Gameplay.Level
|
|||
|
||||
|
||||
|
||||
private void _OnHit(bool teamSelectCharacterExist,
|
||||
private async void _OnHit(bool teamSelectCharacterExist,
|
||||
uint characterIDHere,
|
||||
Vector3 worldPosition)
|
||||
{
|
||||
|
|
@ -241,6 +241,8 @@ namespace Gameplay.Level
|
|||
//TODO chenyq 需要添加到stringconfig
|
||||
UITipsManager.ShowTips("上阵人数达到上限!");
|
||||
_SendDragCancelEvent();
|
||||
LevelManager.Instance.CurrentLevel.UnSelectUnit();
|
||||
TeamManager.Instance.SetSelectID();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -250,10 +252,10 @@ namespace Gameplay.Level
|
|||
switch (unitType)
|
||||
{
|
||||
case SingleTeamCharacterInfo.CharacType.Hero:
|
||||
_CreateCharacter(TeamManager.Instance.SelectID, worldPosition, yaw);
|
||||
await _CreateCharacter(TeamManager.Instance.SelectID, worldPosition, yaw);
|
||||
break;
|
||||
case SingleTeamCharacterInfo.CharacType.Vehicle:
|
||||
_CreateVehicle(TeamManager.Instance.SelectID, worldPosition, yaw);
|
||||
await _CreateVehicle(TeamManager.Instance.SelectID, worldPosition, yaw);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -748,6 +748,8 @@ public class UITeamFightController : UIWindow
|
|||
{
|
||||
if (!LevelManager.Instance.CurrentLevel.IsInBattle())
|
||||
{
|
||||
//TeamManager.Instance.SetSelectID();
|
||||
//ClearSelectFight();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -762,8 +764,10 @@ public class UITeamFightController : UIWindow
|
|||
if (character.statusData.isChaos || character.statusData.isRetreat || character.statusData.isStun)
|
||||
{
|
||||
TeamManager.Instance.SelectToFight();
|
||||
ClearSelectFight();
|
||||
//ClearSelectFight();
|
||||
}
|
||||
|
||||
ClearSelectFight();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -803,7 +807,7 @@ public class UITeamFightController : UIWindow
|
|||
}
|
||||
TeamManager.Instance.SetSelectID();
|
||||
ClearWaitSelect();
|
||||
|
||||
LevelManager.Instance.CurrentLevel.UnSelectUnit();
|
||||
}
|
||||
|
||||
if (LevelManager.Instance.CurrentLevel.IsInBattle())
|
||||
|
|
@ -1018,7 +1022,6 @@ public class UITeamFightController : UIWindow
|
|||
var waitIDList = TeamManager.Instance.GetWaitList();
|
||||
var idx = waitIDList.IndexOf(uid);
|
||||
TeamManager.Instance.SetIDReborn(uid);
|
||||
DebugUtil.LogError("OnUnitReborn, Uid: "+ uid);
|
||||
RefreshWaitListFighting();
|
||||
}
|
||||
|
||||
|
|
@ -1152,6 +1155,7 @@ public class UITeamFightController : UIWindow
|
|||
|
||||
if (LevelManager.Instance.CurrentLevel.IsPreparing())
|
||||
{
|
||||
LevelManager.Instance.CurrentLevel.UnSelectUnit();
|
||||
TeamManager.Instance.SelectToFight(uid);
|
||||
ClearSelectFight();
|
||||
int idx = TeamManager.Instance.GetWaitList().IndexOf(uid);
|
||||
|
|
@ -1475,6 +1479,16 @@ public class UITeamFightController : UIWindow
|
|||
|
||||
private void OnItemStartDrag(uint uid)
|
||||
{
|
||||
var unit = GameUnitManager.instance.totalUnits.Search(uid);
|
||||
if (TeamManager.Instance.IsFightListLimit(uid))
|
||||
{
|
||||
if (!unit.statusData.isOnVehicle)
|
||||
{
|
||||
UITipsManager.ShowTips("上阵人数达到上限!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_dragingUid = uid;
|
||||
ScrollView_WaitFight.horizontal = false;
|
||||
|
||||
|
|
@ -1482,22 +1496,12 @@ public class UITeamFightController : UIWindow
|
|||
|
||||
if (LevelManager.Instance.CurrentLevel.IsInBattle())
|
||||
{
|
||||
var unit = GameUnitManager.instance.totalUnits.Search(uid);
|
||||
|
||||
if (unit.statusData.isDead)
|
||||
{
|
||||
_dragingUid = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (TeamManager.Instance.IsFightListLimit(uid))
|
||||
{
|
||||
if (!unit.statusData.isOnVehicle)
|
||||
{
|
||||
UITipsManager.ShowTips("上阵人数达到上限!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ScrollView_WaitFight.scrollSensitivity = 100;
|
||||
|
|
|
|||
Loading…
Reference in New Issue