This commit is contained in:
yanghua 2024-12-26 17:47:51 +08:00
parent 999ce2507d
commit 32a5618200
8 changed files with 68 additions and 50 deletions

View File

@ -132,7 +132,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3}
propertyPath: m_RootOrder
value: 3
value: 2
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9171eca83e743a24d9191ba07b562eb5, type: 3}
propertyPath: m_LocalPosition.x
@ -382,7 +382,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1411090331}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!114 &772251466
MonoBehaviour:
@ -621,10 +621,10 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1768481224}
- {fileID: 2089319124}
- {fileID: 772251465}
- {fileID: 1136531139}
- {fileID: 1768481224}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -880,7 +880,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bab65147af79bc847876b53f253d65c4, type: 3}
propertyPath: m_RootOrder
value: 0
value: 3
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bab65147af79bc847876b53f253d65c4, type: 3}
propertyPath: m_LocalPosition.x
@ -2209,7 +2209,7 @@ Transform:
- {fileID: 8349363051970068140}
- {fileID: 5323224703424836121}
m_Father: {fileID: 1411090331}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 62.853, z: 0}
--- !u!95 &2089319125
Animator:

View File

@ -42,20 +42,11 @@ public class Score_7002 : ScoreBase
{
base.Init();
//SendMsg = sendMsg;
scoreList = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0 ,0};
scoreList = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
cdzIndex = 0;
xzDic[1] = new Dictionary<int, bool[]>();
for (int i = 1; i <= 4; i++)
{
xzDic[1][i] = new bool[2] { false, false };
}
xzDic[2] = new Dictionary<int, bool[]>();
for (int i = 1; i <= 9; i++)
{
xzDic[2][i] = new bool[2] { false, false };
}
List<ScoreSubjectStep> tmps= new List<ScoreSubjectStep>();
ResetDic();
List<ScoreSubjectStep> tmps = new List<ScoreSubjectStep>();
tmps.Add(new ScoreSubjectStep(1, 5));
tmps.Add(new ScoreSubjectStep(2, 5));
tmps.Add(new ScoreSubjectStep(3, 5));
@ -66,28 +57,41 @@ public class Score_7002 : ScoreBase
tmps.Add(new ScoreSubjectStep(8, 5));
steps = new Dictionary<int, ScoreSubjectStep>();
tmps.ForEach(a =>
tmps.ForEach(a =>
{
steps.Add(a.subProcessId, a);
});
List<D_SubProcess> dsteps=new List<D_SubProcess>();
DataManager.Instance.d_System.subjects.Find(a => a.id == schemeId).processes.ForEach(a =>
List<D_SubProcess> dsteps = new List<D_SubProcess>();
DataManager.Instance.d_System.subjects.Find(a => a.id == schemeId).processes.ForEach(a =>
{
dsteps.AddRange(a.subProcesses);
});
for (int i = 0; i < steps.Count; i++)
{
steps[i+1].step = dsteps[i];
steps[i + 1].step = dsteps[i];
}
static_steps = steps;
}
public static void ResetDic()
{
xzDic[1] = new Dictionary<int, bool[]>();
for (int i = 1; i <= 4; i++)
{
xzDic[1][i] = new bool[2] { false, false };
}
xzDic[2] = new Dictionary<int, bool[]>();
for (int i = 1; i <= 9; i++)
{
xzDic[2][i] = new bool[2] { false, false };
}
}
public override void SetDeviceControl(Device_Control device_Control)
{
this.device_Control = (Device_Control_2002)device_Control;
}
public override void CheckScore(string triggerName, object para)
{
base.CheckScore(triggerName, para);
@ -108,26 +112,26 @@ public class Score_7002 : ScoreBase
//sendMsg(0);
}
}
else if(triggerName == "现场按钮")
else if (triggerName == "现场按钮")
{
steps[3].SetScore(true);
process = 3;
scoreList[process] = 0;
//sendMsg(0);
}
else if(triggerName== "巡视场站")
else if (triggerName == "巡视场站")
{
steps[4].SetScore(true);
process = 4;
scoreList[process] = 5;
//sendMsg(0);
}
else if(triggerName== "拆装工单按钮" && para.ToString() == "1")
else if (triggerName == "拆装工单按钮" && para.ToString() == "1")
{
float tmp = 0;
for(int i = 1;i <=4;i++)
for (int i = 1; i <= 4; i++)
{
if(xzDic[1][i][1])
if (xzDic[1][i][1])
{
tmp += 1.0f / 4.0f;
}
@ -145,6 +149,7 @@ public class Score_7002 : ScoreBase
process = 6;
scoreList[process] = 5;
//sendMsg(0);
}
else if (triggerName == "²ð×°¹¤µ¥°´Å¥" && para.ToString() == "2")
{
@ -158,8 +163,8 @@ public class Score_7002 : ScoreBase
}
steps[7].SetScore(tmp);
process = 7;
scoreList[process] = (int)(tmp * 45.0f);
process = 8;
@ -167,7 +172,13 @@ public class Score_7002 : ScoreBase
//sendMsg(1);
//over
}
else if (triggerName == "撤离现场")
{
steps[8].SetScore(true);
//sendMsg(0);
}
}
//private void sendMsg(int isComp)
@ -201,7 +212,7 @@ public class Score_7002 : ScoreBase
// GameManager.NetMgr.add();
//}
/// <summary>
/// ?????List??,??????
@ -209,7 +220,7 @@ public class Score_7002 : ScoreBase
/// <exception cref="System.NotImplementedException"></exception>
public override string SaveSceneBufferList()
{
return "";
//throw new System.NotImplementedException();
}
@ -219,7 +230,7 @@ public class Score_7002 : ScoreBase
/// </summary>
public override void LoadSceneBufferList(string sceneInfo)
{
//throw new System.NotImplementedException();
}
}

View File

@ -51,7 +51,7 @@ public class StepState_7002 : StepState
}
else if (num == 2)
{
OfficeManager.Instance.mobileController.downIndex = 2;
OfficeManager.Instance.mobileController.downIndex = 1;
OfficeManager.Instance.mobileAttch10007.index = 1;
Score_7002.cdzIndex = 0;
}
@ -62,6 +62,7 @@ public class StepState_7002 : StepState
else if (num == 4)
{
Score_7002.cdzIndex = 0;
Score_7002.ResetDic();
Player10007_7002.Instance.moveNum = 0;
}
else if (num == 5)
@ -71,6 +72,14 @@ public class StepState_7002 : StepState
}
else if (num == 6)
{
for (int i = 1; i <= 4; i++)
{
Score_7002.xzDic[1][i] = new bool[2] { false, true };
}
for (int i = 1; i <= 9; i++)
{
Score_7002.xzDic[2][i] = new bool[2] { false, false };
}
Score_7002.cdzIndex = 1;
}
else if (num == 7)
@ -79,6 +88,14 @@ public class StepState_7002 : StepState
}
else if (num == 8)
{
for (int i = 1; i <= 4; i++)
{
Score_7002.xzDic[1][i] = new bool[2] { false, true };
}
for (int i = 1; i <= 9; i++)
{
Score_7002.xzDic[2][i] = new bool[2] { false, true };
}
GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID("³·ÀëÏÖ³¡", true);
}
}

View File

@ -121,6 +121,7 @@ public class UI_InstallAndDismantleTicketPanel_10007_7002 : BasePanel
//GameManager.ProcessMgr.CheckSubProcessSteps(GameManager.ProcessMgr.subProcessStepId);
GameManager.UIMgr.HidePanel<UI_InstallAndDismantleTicketPanel_10007_7002>();
GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID("撤离现场", true);
ScoreManager.instance.Check("撤离现场", null);
}
break;

View File

@ -282,14 +282,7 @@ public class GameManager : SingletonAutoMono<GameManager>
GameManager.RunModelMgr.schemeID = 7002;
GameManager.ProcessMgr.Init(GameManager.RunModelMgr.schemeID);
//GameManager.UIMgr.ShowPanel<UI_LoadingPanel>(E_UI_Layer.System, (panel) =>
//{
//GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Bot, (panel) =>
//{
// panel.Init();
//});
//panel.Init();
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.1f);
GameManager.NetMgr.init_getSerData(() =>
{
@ -377,12 +370,7 @@ public class GameManager : SingletonAutoMono<GameManager>
GameManager.EventMgr.EventTrigger<string>(Enum_EventType.SwitchSubProcessStepTriggerID, ProcessManager.Instance.subProcessStepTriggerID);
}
});
//});
}
else

View File

@ -19,14 +19,14 @@ public class UI_PracticeInfoItem : BaseItem
{
pointData = $"<color=#FF0000>{ sInfo.stepName}</color>";
pointInfoData = $"<color=#FF0000>{sInfo.testPoint}</color>";
scoreData = $"<color=#FF0000>{sInfo.setScore}</color>/{sInfo.defaultScore}";
scoreData = $"<color=#FF0000>{sInfo.setScore.ToString("F1")}</color>/{sInfo.defaultScore}";
}
else
{
pointData = sInfo.stepName;
pointInfoData = sInfo.testPoint;
scoreData = $"<color=#00EEE6>{sInfo.setScore}</color>/{sInfo.defaultScore}";
scoreData = $"<color=#00EEE6>{sInfo.setScore.ToString("F1")}</color>/{sInfo.defaultScore}";
}
point.text = pointData;
pointInfo.text = pointInfoData;

View File

@ -20,7 +20,7 @@ public class UI_PracticeCompletedPanel : BasePanel
temp.Init(index, scoreModel.stepList[index]);
}
GetControl<TextMeshProUGUI>("ScoreRes").text = scoreModel.score.ToString();
GetControl<TextMeshProUGUI>("ScoreRes").text = scoreModel.score.ToString("F1");
GetControl<TextMeshProUGUI>("UsedTimesRes").text = (DateTime.Now - GameManager.RunModelMgr.startTime).ToString(@"hh\:mm\:ss");
Debug.Log("开始时间:" + GameManager.RunModelMgr.startTime.ToString() + " 结束时间:" + DateTime.Now.ToString());
}

View File

@ -86,6 +86,7 @@ public class UI_TaskListPanel : BasePanel
break;
case "ReStartBtn":
ClickFirstSubProcessesItem(0);
ScoreManager.instance.ReInit();
break;
case "RePracticeBtn":
ResetPractice();