Browse Source

修复bug

“hujiajun” 6 months ago
parent
commit
fabd8a59d5

File diff suppressed because it is too large
+ 42 - 0
Assets/Scenes/Game.unity


BIN
Assets/StreamingAssets/ui/daoju_1.png


+ 1 - 1
Assets/StreamingAssets/ui/daoju_1.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: e35b8367abcb84b4eb1f3d436e44ae91
+guid: 4f46fadfc833844d1aee4c380b2ee3d6
 DefaultImporter:
   externalObjects: {}
   userData: 

+ 9 - 3
Assets/TaskManager.cs

@@ -61,10 +61,9 @@ public class TaskManager : MonoBehaviour
     public int nowTaskCt;
     public GameObject main_click;
 
-
+    public GameObject inputbt;
     private void Awake()
     {
-      //  PlayerPrefs.DeleteAll();
         StartCoroutine(InitGame());
     }
 
@@ -226,7 +225,8 @@ public class TaskManager : MonoBehaviour
             }
         }
         dialogueText.GetComponent<Button>().enabled = ti.isTextNext;
-      
+
+        inputbt.SetActive(false);
         nongwu.SetActive(ti.isnongwu);
         HtmlBG.SetActive(ti.type!=TaskConfig.TaskType.ARTask);
         shibie.SetActive(false);
@@ -355,6 +355,7 @@ public class TaskManager : MonoBehaviour
                 {
                     ar.PauseCamera();
                 }
+                inputbt.SetActive(true);
                 ar_2img.SetActive(false);
                 ar_1img.SetActive(false);
                 Main.SetActive(false);
@@ -420,6 +421,11 @@ public class TaskManager : MonoBehaviour
     }
     public void nextTask()
     {
+        if(nowTaskItem.type == TaskConfig.TaskType.InputTask)
+        {
+            Inputgo.GetComponent<InputField>().text = "";
+        }
+
         if(!allimg.activeSelf||(allimg.activeSelf&& nowTaskItem.isClose)|| nowTaskItem.type== TaskConfig.TaskType.ChooseTask)
         {
             if (nowTaskIndex + 1 >= ntconfig.TaskList.Count)

+ 12 - 5
Assets/XXQQ/MyPingTu.cs

@@ -29,7 +29,7 @@ public class MyPingTu : MonoBehaviour
        Shuffle(UIShowImage);
         InitShow();
     }
-
+   
     /// <summary>
     /// 数组打乱
     /// </summary>
@@ -69,7 +69,7 @@ public class MyPingTu : MonoBehaviour
         }
     }
 
-    void InitShow()
+    void InitShow(bool isinit=false)
     {
         //初始化显示图片
         for (int i = 0; i < UIShowImage.Length; ++i)
@@ -81,9 +81,13 @@ public class MyPingTu : MonoBehaviour
             //指定Obj
             itemImg[i]._Obj = t.gameObject;
             var item = itemImg[i];
-            itemImg[i]._Obj.GetComponent<Button>().onClick.AddListener(delegate () {
-                this.OnClickEvent(item);
-            });
+            if(!isinit)
+            {
+
+                itemImg[i]._Obj.GetComponent<Button>().onClick.AddListener(delegate () {
+                    this.OnClickEvent(item);
+                });
+            }
         }
         itemImg[length - 1]._Obj.GetComponent<Image>().sprite = null;
         itemImg[length - 1]._sprite = null;
@@ -155,6 +159,9 @@ public class MyPingTu : MonoBehaviour
         }
         return true;
     }
+    private void OnEnable()
+    {    
+    }
 }
 
 public class ItemImg

Some files were not shown because too many files changed in this diff