Merge branch 'SXElectricityInformationAcquisition' of http://git.umayle.com/huangjiayu/ShanxiKnowledgeBase into SXElectricityInformationAcquisition
This commit is contained in:
commit
e4af0fdece
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -263,10 +263,22 @@ PrefabInstance:
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 195
|
value: 195
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3592094085120368532, guid: fa12b84946083d14cb4447029910be28, type: 3}
|
||||||
|
propertyPath: m_text
|
||||||
|
value: "\u200B"
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3592094085120368532, guid: fa12b84946083d14cb4447029910be28, type: 3}
|
||||||
|
propertyPath: m_enableWordWrapping
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3598037006673712039, guid: fa12b84946083d14cb4447029910be28, type: 3}
|
- target: {fileID: 3598037006673712039, guid: fa12b84946083d14cb4447029910be28, type: 3}
|
||||||
propertyPath: sceneName
|
propertyPath: sceneName
|
||||||
value: "\u5DE5\u5177\u95F4"
|
value: "\u5DE5\u5177\u95F4"
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3749027150314622874, guid: fa12b84946083d14cb4447029910be28, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3762193856401640109, guid: fa12b84946083d14cb4447029910be28, type: 3}
|
- target: {fileID: 3762193856401640109, guid: fa12b84946083d14cb4447029910be28, type: 3}
|
||||||
propertyPath: m_Enabled
|
propertyPath: m_Enabled
|
||||||
value: 1
|
value: 1
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -12,6 +12,7 @@ public class ConsumePowerManager : MonoBehaviour
|
||||||
public static ConsumePowerManager Instance;
|
public static ConsumePowerManager Instance;
|
||||||
public delegate void OpenLight();
|
public delegate void OpenLight();
|
||||||
public event OpenLight OnOpenLight;
|
public event OpenLight OnOpenLight;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
Instance = this;
|
Instance = this;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace DefaultNamespace.Dto
|
||||||
public List<EnergyWorkList> worklist { get; set; }
|
public List<EnergyWorkList> worklist { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SceneData
|
public class ElectricEnergyData
|
||||||
{
|
{
|
||||||
public string scenename { get; set; }
|
public string scenename { get; set; }
|
||||||
public string questbooks { get; set; }
|
public string questbooks { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public class InfoDataManager : ModuleSingleton<InfoDataManager>, IModule
|
||||||
|
|
||||||
// 第一部分 sxfz://
|
// 第一部分 sxfz://
|
||||||
string prefix = dataSections[0];
|
string prefix = dataSections[0];
|
||||||
Debug.Log("Prefix: " + prefix);
|
// Debug.Log("Prefix: " + prefix);
|
||||||
|
|
||||||
// 第二部分 lyht,0,18,userId,username,token,90
|
// 第二部分 lyht,0,18,userId,username,token,90
|
||||||
string dataSection = dataSections[1];
|
string dataSection = dataSections[1];
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class NewBehaviourScript : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
|
public class MenuBtOnClick : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
|
||||||
{
|
{
|
||||||
[SerializeField] private Sprite defaultSprite;
|
[SerializeField] private Sprite defaultSprite;
|
||||||
[SerializeField] private Sprite clickSprite;
|
[SerializeField] private Sprite clickSprite;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ public class MessageManager : MonoBehaviour
|
||||||
|
|
||||||
async void Start()
|
async void Start()
|
||||||
{
|
{
|
||||||
await Task.Delay(TimeSpan.FromSeconds(1));
|
await Task.Delay(TimeSpan.FromSeconds(1.5f));
|
||||||
if (MotionEngine.GetModule<AnimationProcessManager>().GetProcessMode() == ProcessMode.Teaching || MotionEngine.GetModule<AnimationProcessManager>().GetProcessMode() == ProcessMode.Assessment)
|
if (MotionEngine.GetModule<AnimationProcessManager>().GetProcessMode() == ProcessMode.Teaching || MotionEngine.GetModule<AnimationProcessManager>().GetProcessMode() == ProcessMode.Assessment)
|
||||||
{
|
{
|
||||||
this.gameObject.SetActive(false);
|
this.gameObject.SetActive(false);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using DefaultNamespace.Dto;
|
using DefaultNamespace.Dto;
|
||||||
using HighlightPlus;
|
using HighlightPlus;
|
||||||
using MotionFramework;
|
using MotionFramework;
|
||||||
|
|
@ -26,7 +27,7 @@ namespace DefaultNamespace.ProcessMode
|
||||||
|
|
||||||
public AnimationProcess CurrentProcess => _processes[_currentMode.ToString()];
|
public AnimationProcess CurrentProcess => _processes[_currentMode.ToString()];
|
||||||
|
|
||||||
public delegate void CompleteEventHandler();
|
public delegate void CompleteEventHandler(float score);
|
||||||
|
|
||||||
public delegate void UIEventHandler();
|
public delegate void UIEventHandler();
|
||||||
|
|
||||||
|
|
@ -38,6 +39,7 @@ namespace DefaultNamespace.ProcessMode
|
||||||
public event CompleteEventHandler OnCompleteEvent;
|
public event CompleteEventHandler OnCompleteEvent;
|
||||||
|
|
||||||
public event UIEventHandler OnUIEvent;
|
public event UIEventHandler OnUIEvent;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 右上角消息通知
|
/// 右上角消息通知
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -131,6 +133,7 @@ namespace DefaultNamespace.ProcessMode
|
||||||
{
|
{
|
||||||
Debug.Log($"正确点击了:{clickedObject}");
|
Debug.Log($"正确点击了:{clickedObject}");
|
||||||
currentAction.ClickedObjects.Add(clickedObject); // 添加到已点击对象集合
|
currentAction.ClickedObjects.Add(clickedObject); // 添加到已点击对象集合
|
||||||
|
currentAction.CurrentObjectIndex++;
|
||||||
HandleModeFeedback(_currentMode, currentAction); // 处理模式特定的反馈
|
HandleModeFeedback(_currentMode, currentAction); // 处理模式特定的反馈
|
||||||
|
|
||||||
if (currentAction.ClickedObjects.Count >= currentAction.TargetObjects.Count)
|
if (currentAction.ClickedObjects.Count >= currentAction.TargetObjects.Count)
|
||||||
|
|
@ -205,10 +208,10 @@ namespace DefaultNamespace.ProcessMode
|
||||||
{
|
{
|
||||||
if (MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.其他)
|
if (MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.其他)
|
||||||
{
|
{
|
||||||
OnCompleteEvent?.Invoke();
|
OnCompleteEvent?.Invoke(CalculateTotalScore());
|
||||||
}
|
}
|
||||||
|
|
||||||
CalculateTotalScore();
|
|
||||||
Debug.Log("全部完成了!!!!");
|
Debug.Log("全部完成了!!!!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -231,10 +234,10 @@ namespace DefaultNamespace.ProcessMode
|
||||||
{
|
{
|
||||||
if (MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.其他)
|
if (MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.其他)
|
||||||
{
|
{
|
||||||
OnCompleteEvent?.Invoke();
|
OnCompleteEvent?.Invoke(CalculateTotalScore());
|
||||||
}
|
}
|
||||||
|
|
||||||
CalculateTotalScore();
|
|
||||||
Debug.Log("全部完成了!!!!");
|
Debug.Log("全部完成了!!!!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -400,7 +403,7 @@ namespace DefaultNamespace.ProcessMode
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算总分
|
/// 计算总分
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void CalculateTotalScore()
|
private float CalculateTotalScore()
|
||||||
{
|
{
|
||||||
float totalScore = 0;
|
float totalScore = 0;
|
||||||
foreach (var step in _processes[_currentMode.ToString()].Steps)
|
foreach (var step in _processes[_currentMode.ToString()].Steps)
|
||||||
|
|
@ -417,6 +420,7 @@ namespace DefaultNamespace.ProcessMode
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log($"总分: {totalScore}");
|
Debug.Log($"总分: {totalScore}");
|
||||||
|
return totalScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnCreate(object createParam)
|
public void OnCreate(object createParam)
|
||||||
|
|
@ -441,7 +445,7 @@ namespace DefaultNamespace.ProcessMode
|
||||||
{
|
{
|
||||||
// string json = await MotionEngine.GetModule<WebRequestManager>().GetTextAsync("", null);
|
// string json = await MotionEngine.GetModule<WebRequestManager>().GetTextAsync("", null);
|
||||||
|
|
||||||
string jsonString = @"{
|
string jsonString = @"{
|
||||||
'trainingName':'用电采集终端模拟仿真',
|
'trainingName':'用电采集终端模拟仿真',
|
||||||
'appId':'ydcjzdmnfz001',
|
'appId':'ydcjzdmnfz001',
|
||||||
'version':'1.0.0',
|
'version':'1.0.0',
|
||||||
|
|
@ -516,17 +520,18 @@ namespace DefaultNamespace.ProcessMode
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
}";
|
}";
|
||||||
_sceneStepData = JsonConvert.DeserializeObject<SceneStepData>(jsonString);
|
_sceneStepData = JsonConvert.DeserializeObject<SceneStepData>(jsonString);
|
||||||
|
|
||||||
Debug.Log(_sceneStepData.appId);
|
Debug.Log(_sceneStepData.appId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 初始化步骤
|
/// 初始化步骤
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void InitializeFirstStep()
|
public async void InitializeFirstStep()
|
||||||
{
|
{
|
||||||
|
await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
|
|
||||||
_currentMode = MotionEngine.GetModule<DataConfigManager>().GetProcessMode();
|
_currentMode = MotionEngine.GetModule<DataConfigManager>().GetProcessMode();
|
||||||
|
|
||||||
AddProcess(_currentMode.ToString());
|
AddProcess(_currentMode.ToString());
|
||||||
|
|
@ -538,7 +543,6 @@ namespace DefaultNamespace.ProcessMode
|
||||||
int index = 0;
|
int index = 0;
|
||||||
foreach (var stepData in stepsContainer.Steps)
|
foreach (var stepData in stepsContainer.Steps)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<ActionWithDescription> actions = new List<ActionWithDescription>();
|
List<ActionWithDescription> actions = new List<ActionWithDescription>();
|
||||||
|
|
||||||
foreach (var actionData in stepData.Actions)
|
foreach (var actionData in stepData.Actions)
|
||||||
|
|
@ -555,14 +559,12 @@ namespace DefaultNamespace.ProcessMode
|
||||||
|
|
||||||
//通过接口获取分数数据
|
//通过接口获取分数数据
|
||||||
// AnimationStep step = new AnimationStep(stepData.StepDescription, _sceneStepData.taskList[0].stepList[index].defaultScore, actions);
|
// AnimationStep step = new AnimationStep(stepData.StepDescription, _sceneStepData.taskList[0].stepList[index].defaultScore, actions);
|
||||||
AnimationStep step = new AnimationStep(stepData.StepDescription,stepData.Score , actions);
|
AnimationStep step = new AnimationStep(stepData.StepDescription, stepData.Score, actions);
|
||||||
index++;
|
index++;
|
||||||
AddStepToProcess(_currentMode.ToString(), step);
|
AddStepToProcess(_currentMode.ToString(), step);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//教学模式和培训模式需要初始化一下
|
//教学模式和培训模式需要初始化一下
|
||||||
if (_currentMode == ProcessMode.Teaching || _currentMode == ProcessMode.Training)
|
if (_currentMode == ProcessMode.Teaching || _currentMode == ProcessMode.Training)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,15 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using DefaultNamespace.Dto;
|
using DefaultNamespace.Dto;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace ToolsPack
|
namespace ToolsPack
|
||||||
{
|
{
|
||||||
public class ToolsSceneData : MonoBehaviour
|
public class ElectricEnergyMeterData : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
public List<string> valueNumber = new List<string>();
|
public List<string> valueNumber = new List<string>();
|
||||||
|
public TMP_Text te;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
@ -64,7 +65,7 @@ namespace ToolsPack
|
||||||
}";
|
}";
|
||||||
|
|
||||||
// 解析JSON字符串
|
// 解析JSON字符串
|
||||||
SceneData sceneData = JsonConvert.DeserializeObject<SceneData>(json);
|
ElectricEnergyData electricEnergyData = JsonConvert.DeserializeObject<ElectricEnergyData>(json);
|
||||||
|
|
||||||
// // 输出一些数据来验证解析
|
// // 输出一些数据来验证解析
|
||||||
// Debug.Log("场景名称: " + sceneData.scenename);
|
// Debug.Log("场景名称: " + sceneData.scenename);
|
||||||
|
|
@ -72,15 +73,20 @@ namespace ToolsPack
|
||||||
// Debug.Log("用户信息: " + sceneData.userinformation);
|
// Debug.Log("用户信息: " + sceneData.userinformation);
|
||||||
// Debug.Log("电能表信息: " + sceneData.energyinformation);
|
// Debug.Log("电能表信息: " + sceneData.energyinformation);
|
||||||
//
|
//
|
||||||
foreach (var energy in sceneData.energylist)
|
foreach (var energy in electricEnergyData.energylist)
|
||||||
{
|
{
|
||||||
Debug.Log("Work: " + energy.work);
|
// Debug.Log("Work: " + energy.work);
|
||||||
foreach (var worklist in energy.worklist)
|
foreach (var worklist in energy.worklist)
|
||||||
{
|
{
|
||||||
valueNumber.Add(worklist.valuework);
|
valueNumber.Add(worklist.valuework);
|
||||||
Debug.Log($"Key: {worklist.keywork}, Value: {worklist.valuework}");
|
// Debug.Log($"Key: {worklist.keywork}, Value: {worklist.valuework}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetValue(int index)
|
||||||
|
{
|
||||||
|
te.text = valueNumber[index];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -80,7 +80,6 @@ public class Seal : MonoBehaviour
|
||||||
{
|
{
|
||||||
sealbcl[0].GetComponent<BoxCollider>().enabled = true;
|
sealbcl[0].GetComponent<BoxCollider>().enabled = true;
|
||||||
sealbcl[1].GetComponent<BoxCollider>().enabled = true;
|
sealbcl[1].GetComponent<BoxCollider>().enabled = true;
|
||||||
MotionEngine.GetModule<AnimationProcessManager>().OnCompleteEvent += CompleteEvent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@
|
||||||
"JZQ_螺丝004",
|
"JZQ_螺丝004",
|
||||||
"JZQ_螺丝0044",
|
"JZQ_螺丝0044",
|
||||||
"JZQ_螺丝006",
|
"JZQ_螺丝006",
|
||||||
"JZQ_螺丝007"
|
"JZQ_螺丝005"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -250,14 +250,10 @@
|
||||||
"isSequential": false,
|
"isSequential": false,
|
||||||
"targetObjects": [
|
"targetObjects": [
|
||||||
"JZQ_螺丝001",
|
"JZQ_螺丝001",
|
||||||
"JZQ_螺丝0011",
|
|
||||||
"JZQ_螺丝002",
|
"JZQ_螺丝002",
|
||||||
"JZQ_螺丝0022",
|
|
||||||
"JZQ_螺丝003",
|
"JZQ_螺丝003",
|
||||||
"JZQ_螺丝0033",
|
|
||||||
"JZQ_螺丝004",
|
"JZQ_螺丝004",
|
||||||
"JZQ_螺丝0044",
|
"JZQ_螺丝007",
|
||||||
"JZQ_螺丝005",
|
|
||||||
"JZQ_螺丝006"
|
"JZQ_螺丝006"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -303,7 +299,13 @@
|
||||||
"透明盖子封印碰撞R",
|
"透明盖子封印碰撞R",
|
||||||
"透明盖子封印碰撞L"
|
"透明盖子封印碰撞L"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
{
|
{
|
||||||
"description": "加装封印",
|
"description": "加装封印",
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
|
@ -311,8 +313,13 @@
|
||||||
"targetObjects": [
|
"targetObjects": [
|
||||||
"盖_透明外壳"
|
"盖_透明外壳"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
{
|
{
|
||||||
"description": "加装封印",
|
"description": "加装封印",
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
|
@ -320,7 +327,12 @@
|
||||||
"targetObjects": [
|
"targetObjects": [
|
||||||
"变电箱_门"
|
"变电箱_门"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},{
|
||||||
|
"stepDescription": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
{
|
{
|
||||||
"description": "加装封印",
|
"description": "加装封印",
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
|
@ -328,7 +340,12 @@
|
||||||
"targetObjects": [
|
"targetObjects": [
|
||||||
"柜门卡栓"
|
"柜门卡栓"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},{
|
||||||
|
"stepDescription": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
{
|
{
|
||||||
"description": "加装封印",
|
"description": "加装封印",
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,301 @@
|
||||||
"score": 0,
|
"score": 0,
|
||||||
"isSequential": false,
|
"isSequential": false,
|
||||||
"targetObjects": [
|
"targetObjects": [
|
||||||
"null"
|
"前往现场"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "前往现场",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "前往现场",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": true,
|
||||||
|
"targetObjects": [
|
||||||
|
"Man_stand"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "验电",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "验电",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": true,
|
||||||
|
"targetObjects": [
|
||||||
|
"插座",
|
||||||
|
"箱体",
|
||||||
|
"插座"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "柜门封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "柜门封印",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": true,
|
||||||
|
"targetObjects": [
|
||||||
|
"柜门_封印"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"接线盒_封印R",
|
||||||
|
"接线盒_封印L"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"盖_固定螺丝_Rup",
|
||||||
|
"固定螺丝_Ldown"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": ",更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"接线盒纵向滑块001",
|
||||||
|
"接线盒纵向滑块002",
|
||||||
|
"接线盒纵向滑块003",
|
||||||
|
"接线盒纵向滑块004"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"集中器_封印R",
|
||||||
|
"集中器_封印_L",
|
||||||
|
"壳固定螺丝_R",
|
||||||
|
"壳固定螺丝_L"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"JZQ_螺丝001",
|
||||||
|
"JZQ_螺丝0011",
|
||||||
|
"JZQ_螺丝002",
|
||||||
|
"JZQ_螺丝0022",
|
||||||
|
"JZQ_螺丝003",
|
||||||
|
"JZQ_螺丝0033",
|
||||||
|
"JZQ_螺丝004",
|
||||||
|
"JZQ_螺丝0044",
|
||||||
|
"JZQ_螺丝006",
|
||||||
|
"JZQ_螺丝007"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": true,
|
||||||
|
"targetObjects": [
|
||||||
|
"pCylinder170"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"固定螺丝_Rdown",
|
||||||
|
"集电器固定螺丝_Ldown"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"新的集中器碰撞"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "更换集中器",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"JZQ_螺丝001",
|
||||||
|
"JZQ_螺丝0011",
|
||||||
|
"JZQ_螺丝002",
|
||||||
|
"JZQ_螺丝0022",
|
||||||
|
"JZQ_螺丝003",
|
||||||
|
"JZQ_螺丝0033",
|
||||||
|
"JZQ_螺丝004",
|
||||||
|
"JZQ_螺丝0044",
|
||||||
|
"JZQ_螺丝005",
|
||||||
|
"JZQ_螺丝006"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "临时用电",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "现场调试",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"临时用电"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "现场调试",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "现场调试",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"现场调试"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"透明盖子封印碰撞R",
|
||||||
|
"透明盖子封印碰撞L"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"盖_透明外壳"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stepDescription": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"变电箱_门"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},{
|
||||||
|
"stepDescription": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"柜门卡栓"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},{
|
||||||
|
"stepDescription": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"description": "加装封印",
|
||||||
|
"score": 0,
|
||||||
|
"isSequential": false,
|
||||||
|
"targetObjects": [
|
||||||
|
"电柜门封印box碰撞"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
2024-06-14 15:04:12#'sxfz://;lyht,3,18,userId,username,token,90;/'|
|
2024-06-14 15:04:12#'sxfz://;lyht,2,18,userId,username,token,90;/'|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -134,6 +134,16 @@ public class concentrator : MonoBehaviour
|
||||||
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
|
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
|
||||||
// Debug.Log("所有螺丝都显示");
|
// Debug.Log("所有螺丝都显示");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hit.collider.gameObject.name == "JZQ_ÂÝË¿007s")
|
||||||
|
{
|
||||||
|
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//if (hit.collider.gameObject.name == "pCylinder170")
|
//if (hit.collider.gameObject.name == "pCylinder170")
|
||||||
//{
|
//{
|
||||||
// if (isplaying)
|
// if (isplaying)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using DefaultNamespace.ProcessMode;
|
||||||
|
using MotionFramework;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class CompleteOverComponent : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
public GameObject overGame;
|
||||||
|
public TMP_Text text;
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
MotionEngine.GetModule<AnimationProcessManager>().OnCompleteEvent += CompleteEvent;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CompleteEvent(float score)
|
||||||
|
{
|
||||||
|
overGame.SetActive(true);
|
||||||
|
text.text = "总分:" + score.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f92172c6f4dd34947b81a7864de0de6f
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -7,6 +7,10 @@ public class OpenLightManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
public MeshRenderer mersh;
|
public MeshRenderer mersh;
|
||||||
|
public GameObject ConcentratorMeter;
|
||||||
|
|
||||||
|
public GameObject ElectricEnergyMeter;
|
||||||
|
public GameObject ElectricEnergyMeterCanvas;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
ConsumePowerManager.Instance.OnOpenLight += OpenLightFun;
|
ConsumePowerManager.Instance.OnOpenLight += OpenLightFun;
|
||||||
|
|
@ -18,6 +22,9 @@ public class OpenLightManager : MonoBehaviour
|
||||||
private void OpenLightFun()
|
private void OpenLightFun()
|
||||||
{
|
{
|
||||||
mersh.material.SetFloat("_LightSwitch", 1);
|
mersh.material.SetFloat("_LightSwitch", 1);
|
||||||
|
ConcentratorMeter.SetActive(true);
|
||||||
|
ElectricEnergyMeter.SetActive(true);
|
||||||
|
ElectricEnergyMeterCanvas.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using ToolsPack;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Views
|
namespace Views
|
||||||
|
|
@ -8,10 +9,13 @@ namespace Views
|
||||||
public class ThreeTransformerPhotovoltaicView : MonoBehaviour
|
public class ThreeTransformerPhotovoltaicView : MonoBehaviour
|
||||||
{
|
{
|
||||||
public SpriteRenderer spriteRenderer;
|
public SpriteRenderer spriteRenderer;
|
||||||
|
|
||||||
public TextMesh textMesh;
|
public TextMesh textMesh;
|
||||||
|
|
||||||
//public string isFD;
|
//public string isFD;
|
||||||
public Sprite[] sprites;
|
public Sprite[] sprites;
|
||||||
public List<string> infos = new List<string>();
|
public List<string> infos = new List<string>();
|
||||||
|
public ElectricEnergyMeterData ElectricEnergyMeterData;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 表计信息
|
/// 表计信息
|
||||||
|
|
@ -37,11 +41,9 @@ namespace Views
|
||||||
// infos.Add(energylist[index].worklist[j].valuework);
|
// infos.Add(energylist[index].worklist[j].valuework);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// textMesh.text = infos[0];
|
// textMesh.text = infos[0];
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public int index = 0;
|
public int index = 0;
|
||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
|
|
@ -58,16 +60,19 @@ namespace Views
|
||||||
Debug.Log(hit.collider.name);
|
Debug.Log(hit.collider.name);
|
||||||
OnUp();
|
OnUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hit.collider.gameObject.name == "DNB_下")
|
if (hit.collider.gameObject.name == "DNB_下")
|
||||||
{
|
{
|
||||||
Debug.Log(hit.collider.name);
|
Debug.Log(hit.collider.name);
|
||||||
OnDown();
|
OnDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hit.collider.gameObject.name == "上")
|
if (hit.collider.gameObject.name == "上")
|
||||||
{
|
{
|
||||||
Debug.Log(hit.collider.name);
|
Debug.Log(hit.collider.name);
|
||||||
OnUp();
|
OnUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hit.collider.gameObject.name == "下")
|
if (hit.collider.gameObject.name == "下")
|
||||||
{
|
{
|
||||||
Debug.Log(hit.collider.name);
|
Debug.Log(hit.collider.name);
|
||||||
|
|
@ -76,6 +81,7 @@ namespace Views
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnUp()
|
public void OnUp()
|
||||||
{
|
{
|
||||||
index--;
|
index--;
|
||||||
|
|
@ -83,6 +89,7 @@ namespace Views
|
||||||
{
|
{
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetValue(index);
|
SetValue(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,15 +100,17 @@ namespace Views
|
||||||
{
|
{
|
||||||
index = sprites.Length - 1;
|
index = sprites.Length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetValue(index);
|
SetValue(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetValue(int index)
|
private void SetValue(int index)
|
||||||
{
|
{
|
||||||
// if (infos == null || infos.Count == 0) return;
|
// if (infos == null || infos.Count == 0) return;
|
||||||
spriteRenderer.sprite = sprites[index];
|
spriteRenderer.sprite = sprites[index];
|
||||||
//textMesh.text = infos[index];
|
//textMesh.text = infos[index];
|
||||||
|
|
||||||
|
ElectricEnergyMeterData.SetValue(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -23,6 +23,10 @@ public class TooslManager : MonoBehaviour
|
||||||
public Quaternion originalRotation;
|
public Quaternion originalRotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<Tool> tools;
|
public List<Tool> tools;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue