86 lines
2.4 KiB
C#
86 lines
2.4 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using TMPro;
|
|
|
|
public class HegemonTime : MonoBehaviour
|
|
{
|
|
public static HegemonTime instance;
|
|
//public Text timeText;
|
|
public TextMeshProUGUI timeTextMP;
|
|
public int timeNum;
|
|
public int carrySeconds;
|
|
public GameObject InfoObject;
|
|
public AllHouseContro allHouseContro;
|
|
|
|
public DateTime StartDateTime;
|
|
public DateTime BetDateTime;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
instance = this;
|
|
|
|
|
|
//StartGame();
|
|
|
|
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
//Debug.Log("carrySeconds:" + InfoObject.GetComponent<selectGameEscape512>().carrySeconds);
|
|
|
|
}
|
|
//public IEnumerator StartGame()
|
|
//{
|
|
|
|
|
|
// //allHouseContro.ControAllDoorOpen();
|
|
// //while (timeNum >=0)
|
|
// //{
|
|
|
|
// // timeNum = 60 - QueryRoomdetails512.Instance.latestCarrySeconds;
|
|
// // timeText.text = (timeNum).ToString();// 显示整数秒数
|
|
// // yield return new WaitForSeconds(1f);// 等待1秒
|
|
// // timeText.text = (timeNum-1).ToString();
|
|
|
|
// // if ( selectLatest511.instance.status == 1)//停止下注,关门
|
|
// // {
|
|
// // //Gamber513.Instance.roomNo=PlayerMovePos.instance.HouseId;//确定下注房间id
|
|
// // //Gamber513.Instance.UserBet();
|
|
// // allHouseContro.ControAllDoorClose();
|
|
// // MaskContro.instance.SetMask(true);
|
|
// // }
|
|
|
|
// // //if (timeNum < 20)//boos出现
|
|
// // //{
|
|
// // // Debug.Log("Boos来了");
|
|
|
|
// // // BossContro.instance.BossMove();
|
|
// // //}
|
|
// //}
|
|
|
|
|
|
// //timeNum = 60;
|
|
//}
|
|
public void HadInfAndStartGame()//启动倒计时
|
|
{
|
|
//DateTime StartDateTime = DateTime.ParseExact(
|
|
// selectLatest511.instance.startTime, // 输入字符串
|
|
// "yyyy-MM-dd HH:mm:ss", // 格式
|
|
// CultureInfo.InvariantCulture // 使用不变的区域信息
|
|
// );
|
|
//timeNum =60- QueryRoomdetails512.Instance.latestCarrySeconds;
|
|
//StartCoroutine(StartGame());
|
|
}
|
|
|
|
public void GetcarrySeconds()
|
|
{
|
|
carrySeconds=QueryRoomdetails512.Instance.latestCarrySeconds;
|
|
}
|
|
}
|