UTF8
This commit is contained in:
parent
ff8f04fcba
commit
9f85a2fafa
|
@ -0,0 +1,303 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &28351938
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 28351940}
|
||||
- component: {fileID: 28351939}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &28351939
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 28351938}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &28351940
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 28351938}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1763494789
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1763494792}
|
||||
- component: {fileID: 1763494791}
|
||||
- component: {fileID: 1763494790}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1763494790
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1763494789}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1763494791
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1763494789}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1763494792
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1763494789}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e0f7dee5c18aec247a251231ee88dcfb
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,18 +0,0 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 永远存储全局需要使用的值,比如,在进入打开程序的时候,记录下当前登录用户名称/用户ID,然后在最后提交的时候,使用其中的值
|
||||
/// </summary>
|
||||
public class GlobalFlag
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前用户名。
|
||||
/// </summary>
|
||||
public static string currentUserID;
|
||||
/// <summary>
|
||||
/// 当前场景,比如 当前场景是办公室。
|
||||
/// </summary>
|
||||
public static string currentSceneName;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ce0c0a7ad2533d149b50dcd0f7882d63
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -89,6 +89,14 @@ public enum E_ModeType
|
|||
Exam,
|
||||
}
|
||||
|
||||
public enum E_SceneName
|
||||
{
|
||||
None,
|
||||
Office,
|
||||
ToolRoom,
|
||||
LiveScene
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 工具材料设备
|
||||
/// </summary>
|
||||
|
|
|
@ -47,10 +47,7 @@ public class DataManager : BaseManager<DataManager>
|
|||
/// </summary>
|
||||
private Dictionary<int, TB_ToolAndMaterial> toolAndMaterialDic = new Dictionary<int, TB_ToolAndMaterial>();
|
||||
|
||||
/// <summary>
|
||||
/// 用户数据
|
||||
/// </summary>
|
||||
public UserData userData = new UserData();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化
|
||||
|
|
|
@ -8,7 +8,9 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
private ProcessManager() { }
|
||||
private ProcessManager()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 实操项目id
|
||||
|
@ -20,6 +22,11 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
/// </summary>
|
||||
public E_ModeType mode;
|
||||
|
||||
public E_SceneName currentSceneName;
|
||||
/// <summary>
|
||||
/// 用户数据
|
||||
/// </summary>
|
||||
public UserData userData = new UserData();
|
||||
/// <summary>
|
||||
/// 当前的项目/方案
|
||||
/// </summary>
|
||||
|
@ -60,14 +67,15 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
/// 根据方案id 生成流程数据
|
||||
/// </summary>
|
||||
/// <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,E_SceneName currentSceneName, int countDown = 600) //TODO 考试断线重连应该考虑初始化问题
|
||||
{
|
||||
this.currentSceneName = currentSceneName;
|
||||
this.id = id;
|
||||
this.mode = mode;
|
||||
coroutine = GameManager.MonoMgr.StartCoroutine(CountDown(countDown));
|
||||
d_Scheme = DataManager.Instance.GetSchemeData(id);
|
||||
ReportManager.Instance.creport = DataManager.Instance.GetSchemeReport(id);
|
||||
|
||||
|
||||
d_Scheme.Init();
|
||||
Debug.Log("流程初始化完成");
|
||||
}
|
||||
|
@ -115,7 +123,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
while (countDown > 0)
|
||||
{
|
||||
yield return waitForSeconds;
|
||||
countDown --;
|
||||
countDown--;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,8 +134,8 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
{
|
||||
id = -1;
|
||||
mode = E_ModeType.None;
|
||||
if (coroutine!= null)
|
||||
if (coroutine != null)
|
||||
GameManager.MonoMgr.StopCoroutine(coroutine);
|
||||
d_Scheme = null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -29,7 +29,7 @@ public abstract class BaseToolOrDevice : MonoBehaviour
|
|||
|
||||
private void OnMouseEnter()
|
||||
{
|
||||
if (GlobalFlag.currentUserID != "04_ToolMaterialScene") return;
|
||||
if (GameManager.ProcessMgr.userData.userName != "04_ToolMaterialScene") return;
|
||||
if (EventSystem.current.IsPointerOverGameObject()) return;
|
||||
OnEnter();
|
||||
//TODO: 这里写提示打开的代码
|
||||
|
@ -37,7 +37,7 @@ public abstract class BaseToolOrDevice : MonoBehaviour
|
|||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
if (GlobalFlag.currentUserID != "04_ToolMaterialScene") return;
|
||||
if (GameManager.ProcessMgr.userData.userName != "04_ToolMaterialScene") return;
|
||||
if (EventSystem.current.IsPointerOverGameObject()) return;
|
||||
OnDown();
|
||||
gameObject.SetActive(false);
|
||||
|
@ -46,7 +46,7 @@ public abstract class BaseToolOrDevice : MonoBehaviour
|
|||
private void OnMouseExit()
|
||||
{
|
||||
//TODO: 这里写提示关闭的代码
|
||||
if (GlobalFlag.currentUserID != "04_ToolMaterialScene") return;
|
||||
if (GameManager.ProcessMgr.userData.userName != "04_ToolMaterialScene") return;
|
||||
if (EventSystem.current.IsPointerOverGameObject()) return;
|
||||
OnExit();
|
||||
}
|
||||
|
@ -66,7 +66,4 @@ public abstract class BaseToolOrDevice : MonoBehaviour
|
|||
{
|
||||
Debug.Log("离开");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -64,7 +64,7 @@ public class UI_MainTitlePanel : BasePanel
|
|||
|
||||
private void SwitchUserName()
|
||||
{
|
||||
var userName = GameManager.DataMgr.userData.userName;
|
||||
var userName = GameManager.ProcessMgr.userData.userName;
|
||||
GetControl<TextMeshProUGUI>("userNameText (TMP)").text = userName;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@ using UnityEngine.EventSystems;
|
|||
|
||||
public class UI_MenuBar : BasePanel
|
||||
{
|
||||
//展开按钮 ,收起按钮
|
||||
//չ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
[SerializeField]
|
||||
private Sprite ExpandSprite, CollapseSprite;
|
||||
//展开按钮,工具间,前往现场,办理工作票,任务单,返回办公室,拆装填写工单
|
||||
//չ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䣬ǰ<EFBFBD><EFBFBD><EFBFBD>ֳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ذ칫<EFBFBD>ң<EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
private Button CloseDefaultBtn, TooLRoToolRoomBtnomBtn, SiteBtn, WorkOrderBtn, MissionBtn, OfficeBtn, DisassemblyAssemblyWorkOrderBtn;
|
||||
//右侧弹窗
|
||||
//<EFBFBD>Ҳ൯<EFBFBD><EFBFBD>
|
||||
//private Image MenuBarIamge;
|
||||
public void Init()
|
||||
{
|
||||
|
@ -38,12 +38,13 @@ public class UI_MenuBar : BasePanel
|
|||
//}
|
||||
public void checkBtnBySceneName()
|
||||
{
|
||||
TooLRoToolRoomBtnomBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室"|| GlobalFlag.currentSceneName == "现场");
|
||||
SiteBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" || GlobalFlag.currentSceneName == "现场");
|
||||
WorkOrderBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" || GlobalFlag.currentSceneName == "现场");
|
||||
MissionBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" || GlobalFlag.currentSceneName == "现场" || GlobalFlag.currentSceneName == "工具间");
|
||||
OfficeBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" );
|
||||
DisassemblyAssemblyWorkOrderBtn.gameObject.SetActive(GlobalFlag.currentSceneName == "办公室" );
|
||||
|
||||
TooLRoToolRoomBtnomBtn.gameObject.SetActive(GameManager.ProcessMgr.currentSceneName == E_SceneName.Office|| GameManager.ProcessMgr.currentSceneName ==E_SceneName.LiveScene);
|
||||
SiteBtn.gameObject.SetActive(GameManager.ProcessMgr.currentSceneName == E_SceneName.Office || GameManager.ProcessMgr.currentSceneName ==E_SceneName.LiveScene);
|
||||
WorkOrderBtn.gameObject.SetActive(GameManager.ProcessMgr.currentSceneName == E_SceneName.Office || GameManager.ProcessMgr.currentSceneName ==E_SceneName.LiveScene);
|
||||
MissionBtn.gameObject.SetActive(GameManager.ProcessMgr.currentSceneName == E_SceneName.Office || GameManager.ProcessMgr.currentSceneName ==E_SceneName.LiveScene || GameManager.ProcessMgr.currentSceneName == E_SceneName.ToolRoom);
|
||||
OfficeBtn.gameObject.SetActive(GameManager.ProcessMgr.currentSceneName == E_SceneName.Office );
|
||||
DisassemblyAssemblyWorkOrderBtn.gameObject.SetActive(GameManager.ProcessMgr.currentSceneName == E_SceneName.Office );
|
||||
}
|
||||
protected override void OnClick(string btnName)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ public class UI_SelectDevicePanel : BasePanel
|
|||
CreatTitleAndBtnItem();
|
||||
}
|
||||
|
||||
void CreatTitleAndBtnItem()
|
||||
private void CreatTitleAndBtnItem()
|
||||
{
|
||||
var onlyDeviceHashSet = new HashSet<int>();
|
||||
|
||||
|
@ -79,10 +79,6 @@ public class UI_SelectDevicePanel : BasePanel
|
|||
GameManager.UIMgr.HidePanel<UI_SelectDevicePanel>();
|
||||
GameManager.UIMgr.HidePanel<UI_BGPanel>();
|
||||
GameManager.EventMgr.EventTrigger<float>(Enum_EventType.UpdateProgress, 0.9f);
|
||||
GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Bot, (panel) =>
|
||||
{
|
||||
panel.Init();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -6,98 +6,57 @@ using UnityEngine.UI;
|
|||
|
||||
public class MonoMgr : SingletonAutoMono<MonoMgr>
|
||||
{
|
||||
/// <summary>
|
||||
/// ?????
|
||||
/// </summary>
|
||||
private event UnityAction onUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// ????????
|
||||
/// </summary>
|
||||
|
||||
private event UnityAction onFixedUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// ????????
|
||||
/// </summary>
|
||||
private event UnityAction onLateUpdate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ????
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
|
||||
public void AddUpdateListener(UnityAction action)
|
||||
{
|
||||
onUpdate += action;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ???
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
public void RemoveUpdateListener(UnityAction action)
|
||||
{
|
||||
onUpdate -= action;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ????
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
public void AddFixedUpdateListener(UnityAction action)
|
||||
{
|
||||
onFixedUpdate += action;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ???
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
public void RemoveFixedUpdateListener(UnityAction action)
|
||||
{
|
||||
onFixedUpdate -= action;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ????
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
public void AddLateUpdateListener(UnityAction action)
|
||||
{
|
||||
onLateUpdate += action;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ???
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
public void RemoveLateUpdateListener(UnityAction action)
|
||||
{
|
||||
onLateUpdate -= action;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ?????
|
||||
/// </summary>
|
||||
|
||||
private void Update()
|
||||
{
|
||||
onUpdate?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ?????????
|
||||
/// </summary>
|
||||
private void FixedUpdate()
|
||||
{
|
||||
onFixedUpdate?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ????????
|
||||
/// </summary>
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
onLateUpdate?.Invoke();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -6,13 +6,17 @@ using UnityEngine.SceneManagement;
|
|||
|
||||
public class ScenesManager : BaseManager<ScenesManager>
|
||||
{
|
||||
private ScenesManager() { }
|
||||
private ScenesManager()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 同步加载场景
|
||||
/// </summary>
|
||||
/// <param name="sceneName">场景名称</param>
|
||||
/// <param name="action">场景加载后需要做的</param>
|
||||
public void LoadScene(string sceneName, UnityAction action = null, LoadSceneMode loadSceneMode = LoadSceneMode.Single)
|
||||
public void LoadScene(string sceneName, UnityAction action = null,
|
||||
LoadSceneMode loadSceneMode = LoadSceneMode.Single)
|
||||
{
|
||||
SceneManager.LoadScene(sceneName, loadSceneMode);
|
||||
action?.Invoke();
|
||||
|
@ -24,7 +28,8 @@ public class ScenesManager : BaseManager<ScenesManager>
|
|||
/// <param name="sceneName">场景名称</param>
|
||||
/// <param name="action">委托</param>
|
||||
/// <param name="loadSceneMode">加载场景方式</param>
|
||||
public void LoadSceneAsyn(string sceneName, UnityAction action = null, LoadSceneMode loadSceneMode = LoadSceneMode.Single)
|
||||
public void LoadSceneAsyn(string sceneName, UnityAction action = null,
|
||||
LoadSceneMode loadSceneMode = LoadSceneMode.Single)
|
||||
{
|
||||
MonoMgr.Instance.StartCoroutine(ReallyLoadScene(sceneName, action));
|
||||
}
|
||||
|
@ -36,16 +41,31 @@ public class ScenesManager : BaseManager<ScenesManager>
|
|||
/// <param name="action">委托</param>
|
||||
/// <param name="loadSceneMode">加载场景方式</param>
|
||||
/// <returns></returns>
|
||||
private IEnumerator ReallyLoadScene(string sceneName, UnityAction action = null, LoadSceneMode loadSceneMode = LoadSceneMode.Single)
|
||||
private IEnumerator ReallyLoadScene(string sceneName, UnityAction action = null,
|
||||
LoadSceneMode loadSceneMode = LoadSceneMode.Single)
|
||||
{
|
||||
AsyncOperation ao = SceneManager.LoadSceneAsync(sceneName, loadSceneMode);
|
||||
do
|
||||
while (!ao.isDone)
|
||||
{
|
||||
//分发事件
|
||||
yield return ao.progress;
|
||||
yield return null;
|
||||
}
|
||||
while (!ao.isDone);
|
||||
GlobalFlag.currentSceneName = sceneName;
|
||||
E_SceneName currentSceneName;
|
||||
switch (sceneName)
|
||||
{
|
||||
case "03_OfficeScene":
|
||||
currentSceneName = E_SceneName.Office;
|
||||
break;
|
||||
case "04_ToolMaterialScene":
|
||||
currentSceneName = E_SceneName.ToolRoom;
|
||||
break;
|
||||
case "05_LiveScene":
|
||||
currentSceneName = E_SceneName.LiveScene;
|
||||
break;
|
||||
default:
|
||||
currentSceneName = E_SceneName.None;
|
||||
break;
|
||||
}
|
||||
GameManager.ProcessMgr.currentSceneName = currentSceneName;
|
||||
action?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,14 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.singularitygroup.hotreload": {
|
||||
"version": "file:com.singularitygroup.hotreload",
|
||||
"depth": 0,
|
||||
"source": "embedded",
|
||||
"dependencies": {
|
||||
"com.unity.ugui": "1.0.0",
|
||||
"com.unity.modules.unitywebrequest": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.2d.sprite": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
|
|
Loading…
Reference in New Issue