You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
872 B
34 lines
872 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using System;
|
|
public class Anomaly : MonoBehaviour
|
|
{
|
|
public GameObject errTip;
|
|
public GameObject nextBtn;
|
|
public int anomaly;//异常区域
|
|
void Start()
|
|
{
|
|
GetComponent<Button>().onClick.AddListener(()=> {
|
|
TaskBase.Instacne.FinishTask(2);
|
|
if (LevelBase.Instance.curArea == anomaly)
|
|
{
|
|
TaskBase.Instacne.FinishTask(4);
|
|
nextBtn.SetActive(true);
|
|
transform.parent.gameObject.SetActive(false);
|
|
}
|
|
else {
|
|
errTip.SetActive(true);
|
|
errTip.GetComponentInChildren<Text>().text = "未检测到异常";
|
|
}
|
|
});
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|