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.
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class ZhuanWanManager : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public static ZhuanWanManager Instance = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
|
{
|
|
|
|
|
Instance = this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public GameObject CeFanCar;
|
|
|
|
|
public Transform CeFanCarPoint;
|
|
|
|
|
public GameObject CeFanChuliWnd;
|
|
|
|
|
public Button CeFanChuliBtn;
|
|
|
|
|
public GameObject CeFanTip;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void StartCeFan()
|
|
|
|
|
{
|
|
|
|
|
//窗口提示
|
|
|
|
|
GameManagerForZhuanWan.Instance.StartTimeAction(Random.Range(10,15), () => { CeFanTip.SetActive(true); });
|
|
|
|
|
|
|
|
|
|
CeFanChuliBtn.onClick.AddListener(() => {
|
|
|
|
|
|
|
|
|
|
//相机移动
|
|
|
|
|
GameManagerForZhuanWan.Instance.pass1Camera.MoveToPoint(CeFanCarPoint);
|
|
|
|
|
//车辆动画播放
|
|
|
|
|
CeFanCar.SetActive(true);
|
|
|
|
|
//等待动画完成后进行处理选项
|
|
|
|
|
GameManagerForZhuanWan.Instance.StartTimeAction(1.5f, () => {
|
|
|
|
|
|
|
|
|
|
Time.timeScale = 0;
|
|
|
|
|
CeFanChuliWnd.SetActive(true);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetTimeScale(float value)
|
|
|
|
|
{
|
|
|
|
|
Time.timeScale = value;
|
|
|
|
|
}
|
|
|
|
|
}
|