Browse Source

开始巡检初始化在Start中执行

蓝色星空 1 year ago
parent
commit
540b419007
1 changed files with 3 additions and 6 deletions
  1. 3 6
      Assets/Game/ShowXunJian/StartXunJian.cs

+ 3 - 6
Assets/Game/ShowXunJian/StartXunJian.cs

@@ -36,13 +36,13 @@ namespace GHZLangChao
 
         public static StartXunJian Instance;
 
-        private void Awake()
+        void Start()
         {
             Instance = this;
             if (mInspectionService == null)
                 mInspectionService = this.GetService<IInspectionService>();
 
-            if(mInspectionService.InspectionInfo.id==PlayerPrefs.GetInt("XunJianInspectionInfoID"))
+            if (mInspectionService.InspectionInfo.id == PlayerPrefs.GetInt("XunJianInspectionInfoID"))
             {
                 var step = PlayerPrefs.GetInt("ShowXunJianStep");
                 if (step != 0)
@@ -50,11 +50,8 @@ namespace GHZLangChao
                     ToggleList[step - 1].isOn = true;
                     currentUIItem = ItemList[step - 1];
                 }
-                //Debug.LogError("step:"+ step);
             }
-        }
-        void Start()
-        {
+
             foreach (Button btn in ScreenshotBtnList)
             {
                 btn.onClick.AddListener(ClickScreenshot);