【战斗】增加UI相关数据

main
刘涛 2024-10-09 13:19:06 +08:00
parent b0d2966bfd
commit e0fc0b45bc
28 changed files with 44408 additions and 33 deletions

View File

@ -4898,7 +4898,7 @@ GameObject:
m_Component:
- component: {fileID: 102560370874659591}
m_Layer: 0
m_Name: EndNotice
m_Name: EndNotice 0
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1516ef86c3c0c6e4985a65e78c8324a4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8c15758231cb0c3439c679be1a039e6a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c6099ca959b8d5546a146a39eb9290f9
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 02841342ab95c9e42a5a2c359951e2d5
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 04269de46a9ddd24bb1cdfeb7a9a19ce
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1dc9175acbd53804887f4f1740099578
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e33b4979a4320394cb9a7533a9c74911
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: aa234a9232438f149a805faad018e0e5
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 86d96003e8cbf9e40bb8324de8339169
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -89,7 +89,8 @@ namespace Gameplay.Area
public void CreateEndNotice(int unitIndex)
{
var loadPath = PathDefine.RoadLine.END_NOTICE;
DebugUtil.Log("CreateEndNotice: " + unitIndex);
var loadPath = PathDefine.RoadLine.END_NOTICES[unitIndex];
var sampleObj = AssetManager.Instance.GetPreLoadResult<GameObject>(loadPath);
_endNoticeObj = Object.Instantiate(sampleObj);
_endNoticeObj.SetActive(false);

View File

@ -39,18 +39,6 @@ namespace Gameplay.Character
buffManager.TriggerEnterBattle();
}
private void _CreateRoadLine()
{
if (commonData.troopId != ETroopsId.Self)
{
return;
}
roadLineView = new RoadLineView();
roadLineView.Init();
roadLineView.UpdateLine(this);
roadLineView.CreateEndNotice(unitUIData.uiIndex);
}
private void ActiveCharacter()
{
if (troopId == ETroopsId.Self)

View File

@ -6,7 +6,19 @@
public static class RoadLine
{
public const string END_NOTICE = "Assets/Art/Other/hud/EndNotice.prefab";
public static string[] END_NOTICES = new string[]
{
"Assets/Art/Other/hud/EndNotice 0.prefab",
"Assets/Art/Other/hud/EndNotice 1.prefab",
"Assets/Art/Other/hud/EndNotice 2.prefab",
"Assets/Art/Other/hud/EndNotice 3.prefab",
"Assets/Art/Other/hud/EndNotice 4.prefab",
"Assets/Art/Other/hud/EndNotice 5.prefab",
"Assets/Art/Other/hud/EndNotice 6.prefab",
"Assets/Art/Other/hud/EndNotice 7.prefab",
"Assets/Art/Other/hud/EndNotice 8.prefab",
"Assets/Art/Other/hud/EndNotice 9.prefab",
};
public const string ROAD_LINE = "Assets/Art/Other/hud/RoadLine.prefab";
public const string ROAD_LINE_STRAIGHT = "Assets/Art/Other/hud/RoadLine_Straight.prefab";

View File

@ -342,8 +342,12 @@ namespace Gameplay.Level
AssetManager.Instance.Unload(SkillRotateCamera.PREFAB_PATH);
AssetManager.Instance.Unload(BlackAreaManagerImpl.BLIT_MAT_PATH);
AssetManager.Instance.Unload(Constants.MOVE_AREA_POINT_PATH);
AssetManager.Instance.Unload(PathDefine.RoadLine.END_NOTICE);
for (int i = 0; i < PathDefine.RoadLine.END_NOTICES.Length; i++)
{
var path = PathDefine.RoadLine.END_NOTICES[i];
AssetManager.Instance.Unload(path);
}
AssetManager.Instance.Unload(PathDefine.RoadLine.ROAD_LINE);
AssetManager.Instance.Unload(PathDefine.RoadLine.ROAD_LINE_STRAIGHT);
@ -571,7 +575,11 @@ namespace Gameplay.Level
AssetManager.Instance.PostPreload(BlackAreaManagerImpl.BLIT_MAT_PATH);
AssetManager.Instance.PostPreload(Constants.MOVE_AREA_POINT_PATH);
AssetManager.Instance.PostPreload(PathDefine.RoadLine.END_NOTICE);
for (int i = 0; i < PathDefine.RoadLine.END_NOTICES.Length; i++)
{
var path = PathDefine.RoadLine.END_NOTICES[i];
AssetManager.Instance.PostPreload(path);
}
AssetManager.Instance.PostPreload(PathDefine.RoadLine.ROAD_LINE);
AssetManager.Instance.PostPreload(PathDefine.RoadLine.ROAD_LINE_STRAIGHT);

View File

@ -195,6 +195,7 @@ public partial class TeamManager
int allCount = cIDs.Length + vInfos.Count;
var count = allCount > WAIT_LIMIT ? WAIT_LIMIT : allCount;
var workUIIndex = 0;
//Test
for (int i = 0; i < cIDs.Length; i++)
{
@ -212,7 +213,8 @@ public partial class TeamManager
continue;
}
singleInfo = new SingleTeamCharacterInfo(CharacterDataInfoManager.Instance.DataDic[id], unit.GetID());
unit.unitUIData.uiIndex = workUIIndex;
workUIIndex++;
selectList.Add(singleInfo);
}
}
@ -225,7 +227,8 @@ public partial class TeamManager
SingleTeamCharacterInfo singleInfo;
var unit = await GameUnitManager.instance.PrepareVehicle(vInfos[i], ETroopsId.Self);
singleInfo = new SingleTeamCharacterInfo(unit.GetID(), vInfos[i]);
unit.unitUIData.uiIndex = workUIIndex;
workUIIndex++;
selectList.Add(singleInfo);
}
}

View File

@ -4,7 +4,9 @@
{
public GameUnit owner;
public int uiIndex = 1;
public int uiIndex;
public bool isContinueLock;
public UnitUIData(GameUnit owner)
{

View File

@ -975,6 +975,18 @@ namespace Gameplay.Unit
{
return "";
}
protected void _CreateRoadLine()
{
if (commonData.troopId != ETroopsId.Self)
{
return;
}
roadLineView = new RoadLineView();
roadLineView.Init();
roadLineView.UpdateLine(this);
roadLineView.CreateEndNotice(unitUIData.uiIndex);
}
}
}

View File

@ -65,18 +65,6 @@ namespace Gameplay.Vehicle.Impl
BuffManager.instance.InitVehicle(this);
buffManager.TriggerEnterBattle();
}
private void _CreateRoadLine()
{
if (commonData.troopId != ETroopsId.Self)
{
return;
}
roadLineView = new RoadLineView();
roadLineView.Init();
roadLineView.UpdateLine(this);
roadLineView.CreateEndNotice(unitUIData.uiIndex);
}
private void _InitProps()
{