Compare commits
3 Commits
ca2a071b35
...
0bed57a113
| Author | SHA1 | Date |
|---|---|---|
|
|
0bed57a113 | |
|
|
c4bf531309 | |
|
|
dbde0b3f2a |
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -1208,9 +1208,9 @@ Transform:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 919132148358585192}
|
m_GameObject: {fileID: 919132148358585192}
|
||||||
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -1.3153876, y: 0.66252714, z: -1.2924924}
|
m_LocalPosition: {x: 0.024442196, y: 0.88570684, z: -1.0056937}
|
||||||
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 5568970732483254973}
|
- {fileID: 5568970732483254973}
|
||||||
|
|
@ -1554,6 +1554,8 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 543450652349448658}
|
- component: {fileID: 543450652349448658}
|
||||||
|
- component: {fileID: 919132148358585194}
|
||||||
|
- component: {fileID: 919132148358585193}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: "\u624B\u673A"
|
m_Name: "\u624B\u673A"
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -1561,6 +1563,32 @@ GameObject:
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
|
--- !u!114 &919132148358585193
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 919132148358585192}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2a85b91b2d2519347b583e108b24f3c8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
downIndex: 0
|
||||||
|
--- !u!65 &919132148358585194
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 919132148358585192}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 0.08355041, y: 0.030540586, z: 0.17206752}
|
||||||
|
m_Center: {x: -0.00045210123, y: 0.0055265427, z: 0.00059360266}
|
||||||
--- !u!1 &919132148708085627
|
--- !u!1 &919132148708085627
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -5221,9 +5249,9 @@ Transform:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 8049962175932441955}
|
m_GameObject: {fileID: 8049962175932441955}
|
||||||
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 133.98299, y: 22.317968, z: 28.679873}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 543450652349448658}
|
m_Father: {fileID: 543450652349448658}
|
||||||
|
|
@ -6901,7 +6929,6 @@ GameObject:
|
||||||
- component: {fileID: 5568970732483254973}
|
- component: {fileID: 5568970732483254973}
|
||||||
- component: {fileID: 9006472541337010437}
|
- component: {fileID: 9006472541337010437}
|
||||||
- component: {fileID: 7964202602271020417}
|
- component: {fileID: 7964202602271020417}
|
||||||
- component: {fileID: 9006472541337010439}
|
|
||||||
- component: {fileID: 9006472541337010438}
|
- component: {fileID: 9006472541337010438}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: shouji1
|
m_Name: shouji1
|
||||||
|
|
@ -7517,23 +7544,164 @@ MonoBehaviour:
|
||||||
m_GameObject: {fileID: 8049962175932441955}
|
m_GameObject: {fileID: 8049962175932441955}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 2a85b91b2d2519347b583e108b24f3c8, type: 3}
|
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
downIndex: 0
|
profile: {fileID: 0}
|
||||||
--- !u!65 &9006472541337010439
|
profileSync: 0
|
||||||
BoxCollider:
|
previewInEditor: 1
|
||||||
m_ObjectHideFlags: 0
|
camerasLayerMask:
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8049962175932441955}
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IsTrigger: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Size: {x: 7.149084, y: 0.81946564, z: 16.000008}
|
m_Bits: 4294967295
|
||||||
m_Center: {x: -0.000009536743, y: 0.34326786, z: -0.000002861023}
|
effectGroup: 0
|
||||||
|
effectGroupLayer:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
effectNameFilter:
|
||||||
|
combineMeshes: 0
|
||||||
|
alphaCutOff: 0
|
||||||
|
cullBackFaces: 1
|
||||||
|
ignoreObjectVisibility: 0
|
||||||
|
reflectionProbes: 0
|
||||||
|
GPUInstancing: 1
|
||||||
|
depthClip: 0
|
||||||
|
cameraDistanceFade: 0
|
||||||
|
cameraDistanceFadeNear: 0
|
||||||
|
cameraDistanceFadeFar: 1000
|
||||||
|
normalsOption: 0
|
||||||
|
ignore: 0
|
||||||
|
_highlighted: 0
|
||||||
|
fadeInDuration: 0
|
||||||
|
fadeOutDuration: 0
|
||||||
|
flipY: 0
|
||||||
|
constantWidth: 1
|
||||||
|
subMeshMask: -1
|
||||||
|
overlay: 0
|
||||||
|
overlayMode: 0
|
||||||
|
overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||||
|
overlayAnimationSpeed: 1
|
||||||
|
overlayMinIntensity: 0.5
|
||||||
|
overlayBlending: 1
|
||||||
|
overlayTexture: {fileID: 0}
|
||||||
|
overlayTextureUVSpace: 0
|
||||||
|
overlayTextureScale: 1
|
||||||
|
outline: 1
|
||||||
|
outlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
outlineColorStyle: 0
|
||||||
|
outlineGradient:
|
||||||
|
serializedVersion: 2
|
||||||
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
ctime0: 0
|
||||||
|
ctime1: 65535
|
||||||
|
ctime2: 0
|
||||||
|
ctime3: 0
|
||||||
|
ctime4: 0
|
||||||
|
ctime5: 0
|
||||||
|
ctime6: 0
|
||||||
|
ctime7: 0
|
||||||
|
atime0: 0
|
||||||
|
atime1: 65535
|
||||||
|
atime2: 0
|
||||||
|
atime3: 0
|
||||||
|
atime4: 0
|
||||||
|
atime5: 0
|
||||||
|
atime6: 0
|
||||||
|
atime7: 0
|
||||||
|
m_Mode: 0
|
||||||
|
m_NumColorKeys: 2
|
||||||
|
m_NumAlphaKeys: 2
|
||||||
|
outlineGradientInLocalSpace: 0
|
||||||
|
outlineWidth: 0.45
|
||||||
|
outlineQuality: 3
|
||||||
|
outlineDownsampling: 2
|
||||||
|
outlineVisibility: 0
|
||||||
|
glowBlendMode: 0
|
||||||
|
outlineOptimalBlit: 1
|
||||||
|
outlineBlitDebug: 0
|
||||||
|
outlineIndependent: 0
|
||||||
|
glow: 0
|
||||||
|
glowWidth: 0.4
|
||||||
|
glowQuality: 3
|
||||||
|
glowDownsampling: 2
|
||||||
|
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
glowDithering: 1
|
||||||
|
glowMagicNumber1: 0.75
|
||||||
|
glowMagicNumber2: 0.5
|
||||||
|
glowAnimationSpeed: 1
|
||||||
|
glowVisibility: 0
|
||||||
|
glowOptimalBlit: 1
|
||||||
|
glowBlitDebug: 0
|
||||||
|
glowBlendPasses: 1
|
||||||
|
glowPasses:
|
||||||
|
- offset: 4
|
||||||
|
alpha: 0.1
|
||||||
|
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
- offset: 3
|
||||||
|
alpha: 0.2
|
||||||
|
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
- offset: 2
|
||||||
|
alpha: 0.3
|
||||||
|
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
- offset: 1
|
||||||
|
alpha: 0.4
|
||||||
|
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
glowIgnoreMask: 0
|
||||||
|
innerGlow: 0
|
||||||
|
innerGlowWidth: 1
|
||||||
|
innerGlowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
innerGlowVisibility: 0
|
||||||
|
targetFX: 0
|
||||||
|
targetFXTexture: {fileID: 0}
|
||||||
|
targetFXColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
targetFXCenter: {fileID: 0}
|
||||||
|
targetFXRotationSpeed: 50
|
||||||
|
targetFXInitialScale: 4
|
||||||
|
targetFXEndScale: 1.5
|
||||||
|
targetFXScaleToRenderBounds: 1
|
||||||
|
targetFXAlignToGround: 0
|
||||||
|
targetFXFadePower: 32
|
||||||
|
targetFXGroundMaxDistance: 10
|
||||||
|
targetFXGroundLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
targetFXTransitionDuration: 0.5
|
||||||
|
targetFXStayDuration: 1.5
|
||||||
|
targetFXVisibility: 1
|
||||||
|
seeThrough: 2
|
||||||
|
seeThroughOccluderMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
seeThroughOccluderThreshold: 0.3
|
||||||
|
seeThroughOccluderMaskAccurate: 0
|
||||||
|
seeThroughOccluderCheckInterval: 1
|
||||||
|
seeThroughOccluderCheckIndividualObjects: 0
|
||||||
|
seeThroughDepthOffset: 0
|
||||||
|
seeThroughMaxDepth: 0
|
||||||
|
seeThroughIntensity: 0.8
|
||||||
|
seeThroughTintAlpha: 0.5
|
||||||
|
seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1}
|
||||||
|
seeThroughNoise: 1
|
||||||
|
seeThroughBorder: 0
|
||||||
|
seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
seeThroughBorderOnly: 0
|
||||||
|
seeThroughBorderWidth: 0.45
|
||||||
|
seeThroughOrdered: 0
|
||||||
|
seeThroughTexture: {fileID: 0}
|
||||||
|
seeThroughTextureUVSpace: 0
|
||||||
|
seeThroughTextureScale: 1
|
||||||
|
rmsCount: 1
|
||||||
|
hitFxInitialIntensity: 0
|
||||||
|
hitFxMode: 0
|
||||||
|
hitFxFadeOutDuration: 0.25
|
||||||
|
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
hitFxRadius: 0.5
|
||||||
--- !u!4 &9011460203944377687
|
--- !u!4 &9011460203944377687
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ public class TB_SubProcess
|
||||||
public string subProcessName;
|
public string subProcessName;
|
||||||
public bool isPrecondition;
|
public bool isPrecondition;
|
||||||
public string precondition;
|
public string precondition;
|
||||||
|
public string toolID;
|
||||||
public string tipTitle;
|
public string tipTitle;
|
||||||
public string tips;
|
public string tips;
|
||||||
}
|
}
|
||||||
|
|
@ -7,5 +7,6 @@ public class TB_SubProcessStep
|
||||||
public string subProcessStepName;
|
public string subProcessStepName;
|
||||||
public bool isPrecondition;
|
public bool isPrecondition;
|
||||||
public string precondition;
|
public string precondition;
|
||||||
|
public string tipTitle;
|
||||||
public float score;
|
public float score;
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
public class TB_ToolAndMaterial
|
public class TB_ToolAndMaterial
|
||||||
{
|
{
|
||||||
public int id;
|
public int id;
|
||||||
public int systemID;
|
public int schemeId;
|
||||||
public string objName;
|
public string objName;
|
||||||
public int type;
|
public int type;
|
||||||
public string prefabName;
|
public string prefabName;
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ public class DataManager : BaseManager<DataManager>
|
||||||
private Dictionary<int, TB_ToolAndMaterial> toolAndMaterialDic = new Dictionary<int, TB_ToolAndMaterial>();
|
private Dictionary<int, TB_ToolAndMaterial> toolAndMaterialDic = new Dictionary<int, TB_ToolAndMaterial>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 初始化
|
/// 初始化
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -76,30 +77,30 @@ public class DataManager : BaseManager<DataManager>
|
||||||
var allSchemeList = new List<TB_Scheme>();
|
var allSchemeList = new List<TB_Scheme>();
|
||||||
foreach (var item in schemeDic.Values)
|
foreach (var item in schemeDic.Values)
|
||||||
{
|
{
|
||||||
if (item.systemId == GameManager.ProcessMgr.id)
|
if (item.systemId == GameManager.Instance.systemId)
|
||||||
allSchemeList.Add(item);
|
allSchemeList.Add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return allSchemeList;
|
return allSchemeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 获取当前系统全部工器具和材料
|
///// 获取当前系统全部工器具和材料
|
||||||
/// </summary>
|
///// </summary>
|
||||||
/// <returns></returns>
|
///// <returns></returns>
|
||||||
public List<TB_ToolAndMaterial> GetCurrentSystemToolAndMaterials()
|
//public List<TB_ToolAndMaterial> GetCurrentSystemToolAndMaterials()
|
||||||
{
|
//{
|
||||||
var currentSystemToolAndMaterials = new List<TB_ToolAndMaterial>();
|
// var currentSystemToolAndMaterials = new List<TB_ToolAndMaterial>();
|
||||||
foreach (var item in toolAndMaterialDic.Values)
|
// foreach (var item in toolAndMaterialDic.Values)
|
||||||
{
|
// {
|
||||||
if (item.systemID == GameManager.ProcessMgr.id)
|
// if (item.systemID == GameManager.ProcessMgr.id)
|
||||||
{
|
// {
|
||||||
currentSystemToolAndMaterials.Add(item);
|
// currentSystemToolAndMaterials.Add(item);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
return currentSystemToolAndMaterials;
|
// return currentSystemToolAndMaterials;
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取D_Scheme
|
/// 获取D_Scheme
|
||||||
|
|
@ -115,7 +116,6 @@ public class DataManager : BaseManager<DataManager>
|
||||||
d_Scheme.id = schemeDic[id].id;
|
d_Scheme.id = schemeDic[id].id;
|
||||||
d_Scheme.schemeName = schemeDic[id].schemeName;
|
d_Scheme.schemeName = schemeDic[id].schemeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
d_Scheme.processes = GetD_Processes(d_Scheme.id);
|
d_Scheme.processes = GetD_Processes(d_Scheme.id);
|
||||||
return d_Scheme;
|
return d_Scheme;
|
||||||
}
|
}
|
||||||
|
|
@ -205,6 +205,32 @@ public class DataManager : BaseManager<DataManager>
|
||||||
return d_SubProcessSteps;
|
return d_SubProcessSteps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<int> GetSubProcessStepIDByToolID(int toolID)
|
||||||
|
{
|
||||||
|
List<TB_SubProcess> tb_subProcesss = new List<TB_SubProcess>();
|
||||||
|
List<int> toolIDTemp = new List<int>();
|
||||||
|
foreach (var item in subProcessDic.Values)
|
||||||
|
{
|
||||||
|
if (item.schemeId == GameManager.ProcessMgr.schemeID)
|
||||||
|
tb_subProcesss.Add(item);
|
||||||
|
}
|
||||||
|
foreach (var item in tb_subProcesss)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(item.toolID))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
string[] subProcessStepToolID = item.toolID.Split(',');
|
||||||
|
for (int i = 0; i < subProcessStepToolID.Length; i++)
|
||||||
|
{
|
||||||
|
if (int.Parse(subProcessStepToolID[i]) == toolID)
|
||||||
|
toolIDTemp.Add(item.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return toolIDTemp;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据系统Id 获取系统信息
|
/// 根据系统Id 获取系统信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ public class GameManager : SingletonAutoMono<GameManager>
|
||||||
ToolAndmaterialMgr = ToolAndmaterialMgr.Instance;
|
ToolAndmaterialMgr = ToolAndmaterialMgr.Instance;
|
||||||
PacksackBagMgr = PacksackBagMgr.Instance;
|
PacksackBagMgr = PacksackBagMgr.Instance;
|
||||||
DataMgr.Init();
|
DataMgr.Init();
|
||||||
ToolAndmaterialMgr.Init();
|
//ToolAndmaterialMgr.Init();
|
||||||
InitData();
|
InitData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,6 @@ public class ProcessManager : BaseManager<ProcessManager>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 实操项目id
|
|
||||||
/// </summary>
|
|
||||||
public int id = 10002;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 模式
|
/// 模式
|
||||||
|
|
@ -74,7 +70,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
||||||
/// <param name="id">方案id</param>
|
/// <param name="id">方案id</param>
|
||||||
public void Init(int id, E_ModeType mode, int countDown = 600) //TODO 考试断线重连应该考虑初始化问题
|
public void Init(int id, E_ModeType mode, int countDown = 600) //TODO 考试断线重连应该考虑初始化问题
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.schemeID = id;
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
coroutine = GameManager.MonoMgr.StartCoroutine(CountDown(countDown));
|
coroutine = GameManager.MonoMgr.StartCoroutine(CountDown(countDown));
|
||||||
d_Scheme = DataManager.Instance.GetSchemeData(id);
|
d_Scheme = DataManager.Instance.GetSchemeData(id);
|
||||||
|
|
@ -115,18 +111,22 @@ public class ProcessManager : BaseManager<ProcessManager>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// 切换
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool CheckSubProcessSteps(string subProcessStepName)
|
public bool CheckSubProcessSteps(int subProcessStepID)
|
||||||
{
|
{
|
||||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.subProcessStepName.Equals(subProcessStepName))
|
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.id.Equals(subProcessStepID))
|
||||||
{
|
{
|
||||||
int spStepID = subProcessStepId + 1;
|
int spStepID = subProcessStepId + 1;
|
||||||
int spStepcount = d_Scheme.CurrentProcess.CurrentSubProcess.subProcessStepes.Count;
|
int spStepcount = d_Scheme.CurrentProcess.CurrentSubProcess.subProcessStepes.Count;
|
||||||
if (spStepID <= d_Scheme.CurrentProcess.CurrentSubProcess.subProcessStepes[spStepcount - 1].id)
|
if (spStepID <= d_Scheme.CurrentProcess.CurrentSubProcess.subProcessStepes[spStepcount - 1].id)
|
||||||
{
|
{
|
||||||
HandoverSubProcessStep(spStepID);
|
HandoverSubProcessStep(spStepID);
|
||||||
|
GameManager.UIMgr.ShowPanel<UI_TopTipPanel>(E_UI_Layer.System, (panel) =>
|
||||||
|
{
|
||||||
|
panel.Init($"{d_Scheme.CurrentProcess.processName}:<color=blue>{d_Scheme.CurrentProcess.CurrentSubProcess.subProcessName}</color>", $"{d_Scheme.CurrentProcess.CurrentSubProcess.tips}");
|
||||||
|
});
|
||||||
Debug.Log("进入下一步子流程步骤");
|
Debug.Log("进入下一步子流程步骤");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -137,6 +137,10 @@ public class ProcessManager : BaseManager<ProcessManager>
|
||||||
if (spID <= d_Scheme.CurrentProcess.subProcesses[spCount - 1].id)
|
if (spID <= d_Scheme.CurrentProcess.subProcesses[spCount - 1].id)
|
||||||
{
|
{
|
||||||
HandoverSubProcess(spID, 0);
|
HandoverSubProcess(spID, 0);
|
||||||
|
GameManager.UIMgr.ShowPanel<UI_TopTipPanel>(E_UI_Layer.System, (panel) =>
|
||||||
|
{
|
||||||
|
panel.Init($"{d_Scheme.CurrentProcess.processName}:<color=blue>{d_Scheme.CurrentProcess.CurrentSubProcess.subProcessName}</color>", $"{d_Scheme.CurrentProcess.CurrentSubProcess.tips}");
|
||||||
|
});
|
||||||
Debug.Log("进入下一步子流程");
|
Debug.Log("进入下一步子流程");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -147,6 +151,10 @@ public class ProcessManager : BaseManager<ProcessManager>
|
||||||
if (pID <= d_Scheme.processes[pCount - 1].id)
|
if (pID <= d_Scheme.processes[pCount - 1].id)
|
||||||
{
|
{
|
||||||
HandoverProcess(pID, 0, 0);
|
HandoverProcess(pID, 0, 0);
|
||||||
|
GameManager.UIMgr.ShowPanel<UI_TopTipPanel>(E_UI_Layer.System, (panel) =>
|
||||||
|
{
|
||||||
|
panel.Init($"{d_Scheme.CurrentProcess.processName}:<color=blue>{d_Scheme.CurrentProcess.CurrentSubProcess.subProcessName}</color>", $"{d_Scheme.CurrentProcess.CurrentSubProcess.tips}");
|
||||||
|
});
|
||||||
Debug.Log("进入下一步流程");
|
Debug.Log("进入下一步流程");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -162,6 +170,10 @@ public class ProcessManager : BaseManager<ProcessManager>
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("按照流程走");
|
Debug.Log("按照流程走");
|
||||||
|
GameManager.UIMgr.ShowPanel<UI_TopTipPanel>(E_UI_Layer.System, (panel) =>
|
||||||
|
{
|
||||||
|
panel.Init($"<color=red>错误:</color>:<color=blue>{d_Scheme.CurrentProcess.CurrentSubProcess.subProcessName}</color>", $"{d_Scheme.CurrentProcess.CurrentSubProcess.tips}");
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -190,7 +202,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void End()
|
public void End()
|
||||||
{
|
{
|
||||||
id = -1;
|
schemeID = -1;
|
||||||
mode = E_ModeType.None;
|
mode = E_ModeType.None;
|
||||||
if (coroutine != null)
|
if (coroutine != null)
|
||||||
GameManager.MonoMgr.StopCoroutine(coroutine);
|
GameManager.MonoMgr.StopCoroutine(coroutine);
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@ public class ToolAndmaterialMgr : BaseManager<ToolAndmaterialMgr>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init()
|
//public void Init()
|
||||||
{
|
//{
|
||||||
toolAndMaterialList = GameManager.DataMgr.GetCurrentSystemToolAndMaterials();
|
// toolAndMaterialList = GameManager.DataMgr.GetCurrentSystemToolAndMaterials();
|
||||||
}
|
//}
|
||||||
|
|
||||||
public string GetIconSpriteName(string objName)
|
public string GetIconSpriteName(string objName)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
@ -5,33 +6,75 @@ using UnityEngine;
|
||||||
public class Device_Mobile : MonoBehaviour
|
public class Device_Mobile : MonoBehaviour
|
||||||
{
|
{
|
||||||
public int downIndex = 0;
|
public int downIndex = 0;
|
||||||
|
public int modelID = 5005;
|
||||||
|
public List<int> subProcessID = new List<int>();
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
subProcessID = GameManager.DataMgr.GetSubProcessStepIDByToolID(modelID);
|
||||||
|
}
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
GameManager.EventMgr.AddEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SwitchSubProcess(int arg0)
|
||||||
|
{
|
||||||
|
if (subProcessID.Contains(arg0))
|
||||||
|
{
|
||||||
|
Debug.Log("ÎÒÓ¦¸ÃÌáʾ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnMouseDown()
|
private void OnMouseDown()
|
||||||
{
|
{
|
||||||
switch (downIndex)
|
switch (downIndex)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (GameManager.ProcessMgr.CheckSubProcessSteps("查看任务单"))
|
if (GameManager.ProcessMgr.CheckSubProcessSteps(4001))
|
||||||
downIndex++;
|
downIndex++;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (GameManager.ProcessMgr.CheckSubProcessSteps("工作预约"))
|
if (GameManager.ProcessMgr.CheckSubProcessSteps(4002))
|
||||||
downIndex++;
|
downIndex++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (GameManager.ProcessMgr.CheckSubProcessSteps("选择正确工作票"))
|
if (GameManager.ProcessMgr.CheckSubProcessSteps(4003))
|
||||||
downIndex++;
|
downIndex++;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
GameManager.ProcessMgr.CheckSubProcessSteps("1212");
|
if (GameManager.ProcessMgr.CheckSubProcessSteps(4004))
|
||||||
downIndex = 0;
|
downIndex++;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if (GameManager.ProcessMgr.CheckSubProcessSteps(4005))
|
||||||
|
downIndex++;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
if (GameManager.ProcessMgr.CheckSubProcessSteps(4006))
|
||||||
|
downIndex++;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
if (GameManager.ProcessMgr.CheckSubProcessSteps(4007))
|
||||||
|
downIndex++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetKeyDown("r"))
|
||||||
|
{
|
||||||
|
GameManager.ProcessMgr.CheckSubProcessSteps(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnMouseExit()
|
private void OnMouseExit()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
GameManager.EventMgr.RemoveEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using TMPro;
|
using TMPro;
|
||||||
|
|
||||||
public class UI_ProcessItem : BasePanel
|
public class UI_ProcessItem : BaseItem
|
||||||
{
|
{
|
||||||
public int processID;
|
public int processID;
|
||||||
public void Init(int processID, string processName)
|
public void Init(int processID, string processName)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,11 @@ public class UI_SubProcessItem : BaseItem
|
||||||
public int processID;
|
public int processID;
|
||||||
public int subProcessID;
|
public int subProcessID;
|
||||||
public int subProcessStepID;
|
public int subProcessStepID;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
GameManager.EventMgr.AddEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||||
|
}
|
||||||
public void Init(D_SubProcess d_SubProcess)
|
public void Init(D_SubProcess d_SubProcess)
|
||||||
{
|
{
|
||||||
this.processID = d_SubProcess.processId;
|
this.processID = d_SubProcess.processId;
|
||||||
|
|
@ -18,14 +23,29 @@ public class UI_SubProcessItem : BaseItem
|
||||||
gameObject.name = subProcessID.ToString();
|
gameObject.name = subProcessID.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ¿ØÖư´Å¥×´Ì¬
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="subProcess"></param>
|
||||||
|
private void SwitchSubProcess(int subProcess)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnClick(string btnName)
|
protected override void OnClick(string btnName)
|
||||||
{
|
{
|
||||||
base.OnClick(btnName);
|
base.OnClick(btnName);
|
||||||
switch (btnName)
|
switch (btnName)
|
||||||
{
|
{
|
||||||
case "subProcessBtn":
|
case "subProcessBtn":
|
||||||
GameManager.ProcessMgr.HandoverProcess(processID, subProcessID, subProcessStepID);
|
//GameManager.ProcessMgr.HandoverProcess(processID, subProcessID, subProcessStepID);
|
||||||
|
GameManager.EventMgr.EventTrigger<int>(Enum_EventType.SwitchSubProcess, subProcessID);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
GameManager.EventMgr.RemoveEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public class UI_MainTitlePanel : BasePanel
|
||||||
|
|
||||||
private void SwitchTitleImg()
|
private void SwitchTitleImg()
|
||||||
{
|
{
|
||||||
var systemInfo = GameManager.DataMgr.GetSystemInfo(GameManager.ProcessMgr.id);
|
var systemInfo = GameManager.DataMgr.GetSystemInfo(GameManager.Instance.systemId);
|
||||||
GetControl<Image>("TopBgImg").sprite =
|
GetControl<Image>("TopBgImg").sprite =
|
||||||
GameManager.ResourcesMgr.Load<Sprite>(Const.UI_MainTitlePanel + systemInfo.titleName);
|
GameManager.ResourcesMgr.Load<Sprite>(Const.UI_MainTitlePanel + systemInfo.titleName);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
|
using Sirenix.OdinInspector;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
|
|
@ -43,16 +44,16 @@ public class UI_SelectDevicePanel : BasePanel
|
||||||
//按钮的父节点是标题的父节点content
|
//按钮的父节点是标题的父节点content
|
||||||
deviceItemBtn.transform.parent = titleItem.transform.parent;
|
deviceItemBtn.transform.parent = titleItem.transform.parent;
|
||||||
deviceItemBtn.GetComponentInChildren<TextMeshProUGUI>().text = x.schemeName;
|
deviceItemBtn.GetComponentInChildren<TextMeshProUGUI>().text = x.schemeName;
|
||||||
|
|
||||||
var deviceBtnAComponent = deviceItemBtn.GetComponent<Button>();
|
var deviceBtnAComponent = deviceItemBtn.GetComponent<Button>();
|
||||||
AddEventForDeviceBtn(deviceBtnAComponent, x.deviceMap, x.id);
|
deviceItemBtn.name = x.id.ToString();
|
||||||
|
AddEventForDeviceBtn(deviceBtnAComponent, x.deviceMap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddEventForDeviceBtn(Button deviceBtnAComponent, string mapName,int schemeID)
|
private void AddEventForDeviceBtn(Button deviceBtnAComponent, string mapName)
|
||||||
{
|
{
|
||||||
GameManager.UIMgr.AddEventTriggerListener(deviceBtnAComponent, EventTriggerType.PointerEnter,
|
GameManager.UIMgr.AddEventTriggerListener(deviceBtnAComponent, EventTriggerType.PointerEnter,
|
||||||
_ =>
|
_ =>
|
||||||
|
|
@ -70,10 +71,14 @@ public class UI_SelectDevicePanel : BasePanel
|
||||||
});
|
});
|
||||||
deviceBtnAComponent.onClick.AddListener(() =>
|
deviceBtnAComponent.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
GameManager.RunModelMgr.deviceId = schemeID;
|
GameManager.RunModelMgr.deviceId = int.Parse(deviceBtnAComponent.name);
|
||||||
|
GameManager.ProcessMgr.Init(GameManager.RunModelMgr.deviceId, E_ModeType.Study);
|
||||||
GameManager.UIMgr.ShowPanel<UI_LoadingPanel>(E_UI_Layer.System, (panel) =>
|
GameManager.UIMgr.ShowPanel<UI_LoadingPanel>(E_UI_Layer.System, (panel) =>
|
||||||
{
|
{
|
||||||
GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Bot, (panel) => { panel.Init(); });
|
GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Bot, (panel) =>
|
||||||
|
{
|
||||||
|
panel.Init();
|
||||||
|
});
|
||||||
|
|
||||||
panel.Init();
|
panel.Init();
|
||||||
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.1f);
|
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.1f);
|
||||||
|
|
@ -100,4 +105,14 @@ public class UI_SelectDevicePanel : BasePanel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Button]
|
||||||
|
public void Test1()
|
||||||
|
{
|
||||||
|
foreach (var VARIABLE in allSchemeName)
|
||||||
|
{
|
||||||
|
Debug.LogError(VARIABLE.deviceMap + VARIABLE.schemeName);
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.LogError(allDeviceTypes.Count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -18,8 +18,6 @@ public class UI_TaskListPanel : BasePanel
|
||||||
GameManager.ResourcesMgr.LoadAsync<UI_SubProcessItem>($"{Const.UI_Item}UI_TaskListPanel/subProcessItem", (stemp) =>
|
GameManager.ResourcesMgr.LoadAsync<UI_SubProcessItem>($"{Const.UI_Item}UI_TaskListPanel/subProcessItem", (stemp) =>
|
||||||
{
|
{
|
||||||
_subProcessItem = stemp;
|
_subProcessItem = stemp;
|
||||||
|
|
||||||
GameManager.ProcessMgr.Init(schemeID, E_ModeType.Study);
|
|
||||||
D_Scheme d_Scheme = GameManager.ProcessMgr.d_Scheme;
|
D_Scheme d_Scheme = GameManager.ProcessMgr.d_Scheme;
|
||||||
for (int i = 0; i < d_Scheme.processes.Count; i++)
|
for (int i = 0; i < d_Scheme.processes.Count; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -28,7 +26,7 @@ public class UI_TaskListPanel : BasePanel
|
||||||
for (int j = 0; j < d_Scheme.processes[i].subProcesses.Count; j++)
|
for (int j = 0; j < d_Scheme.processes[i].subProcesses.Count; j++)
|
||||||
{
|
{
|
||||||
var s = Instantiate(_subProcessItem, _content);
|
var s = Instantiate(_subProcessItem, _content);
|
||||||
s.Init( d_Scheme.processes[i].subProcesses[j]);
|
s.Init(d_Scheme.processes[i].subProcesses[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,9 @@ public enum Enum_EventType
|
||||||
/// 切换场景
|
/// 切换场景
|
||||||
/// </summary>
|
/// </summary>
|
||||||
SwitchScene,
|
SwitchScene,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 切换子流程
|
||||||
|
/// </summary>
|
||||||
|
SwitchSubProcess,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ using UnityEngine.UI;
|
||||||
public class BasePanel : MonoBehaviour
|
public class BasePanel : MonoBehaviour
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ??????????п??
|
/// ??????????§α??
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly Dictionary<string,List<UIBehaviour>> controlDic = new Dictionary<string, List<UIBehaviour>>();
|
private readonly Dictionary<string,List<UIBehaviour>> controlDic = new Dictionary<string, List<UIBehaviour>>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,8 @@ public class OfficeTimelineControl : MonoBehaviour
|
||||||
GameManager.UIMgr.ShowPanel<UI_MaskPanel>(E_UI_Layer.System, (panel) =>
|
GameManager.UIMgr.ShowPanel<UI_MaskPanel>(E_UI_Layer.System, (panel) =>
|
||||||
{
|
{
|
||||||
panel.Init();
|
panel.Init();
|
||||||
GameManager.EventMgr.EventTrigger(Enum_EventType.HideMask);
|
Invoke("DestroyPlayer", 1f);
|
||||||
});
|
});
|
||||||
Invoke(nameof(DestroyPlayer), 1f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,6 +58,7 @@ public class OfficeTimelineControl : MonoBehaviour
|
||||||
{
|
{
|
||||||
panel.Init();
|
panel.Init();
|
||||||
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchScene, GameManager.RunModelMgr.SceneType);
|
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchScene, GameManager.RunModelMgr.SceneType);
|
||||||
|
GameManager.EventMgr.EventTrigger(Enum_EventType.HideMask);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue