贺州人民医院电子沙盘
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.

62 lines
1.6 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class DisasterPanel : MonoBehaviour {
private static DisasterPanel instance;
public static DisasterPanel Instance
{
get
{
return instance;
}
}
public Button create;
public Button edit;
public Button view;
private void Awake()
{
instance = this;
}
// Use this for initialization
void Start () {
create = transform.Find("New").GetComponent<Button>();
create.onClick.AddListener(CreateDisaster);
edit = transform.Find("Edit").GetComponent<Button>();
edit.onClick.AddListener(EditDisaster);
view = transform.Find("View").GetComponent<Button>();
view.onClick.AddListener(ViewDisaster);
}
/// <summary>
/// 新建灾情
/// </summary>
private void CreateDisaster()
{
ResourceLoadWindow.Instance.LoadInputWindow("请输入灾情名称", ConfirmNewDisaster, null, null);
}
private void ConfirmNewDisaster(string inputedName)
{
Debug.Log("灾情名称:" + inputedName);
//新建灾情todo
SceneManager.LoadScene("MainScene_New");
}
/// <summary>
/// 编辑灾情
/// </summary>
private void EditDisaster()
{
//编辑灾情todo
SceneManager.LoadScene("MainScene_New");
}
/// <summary>
/// 查看灾情
/// </summary>
private void ViewDisaster()
{
//查看灾情todo
SceneManager.LoadScene("MainScene_New");
}
}