上海苏宁宝丽嘉酒店,2020.11.17 15:30改为单机版本,以后合成单机版本可以以此版本为模板
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.

39 lines
1.1 KiB

4 years ago
using AX.NetworkSystem;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Security.Cryptography;
using System.Xml;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class AddDisaster : MonoBehaviour
{
private Button addBtn;
4 years ago
// Use this for initialization
void Start()
{
4 years ago
addBtn = GetComponent<Button>();
addBtn.onClick.AddListener(AddNewDisaster);
}
void AddNewDisaster()
4 years ago
{
//获取灾情名称
ResourceLoadWindow.Instance.LoadInputWindow("请输入灾情名称", ConfirmNewDisaster, null, null);
4 years ago
}
private void ConfirmNewDisaster(string disasterName)
{
DisasterInfo msg = new DisasterInfo();
msg.Name = disasterName;
//向服务端申请新建灾情,成功后调用AddDisasterSucced
// NetworkManager.Default.SendAsync("CREATE_DISASTER_INFO_REQUEST", msg);
4 years ago
//单机版
msg.LastTime = DateTime.Now.ToString();
DisasterInfosManager.Instance.AddNewDisasterInfo(msg);
}
4 years ago
}