using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
using Cinemachine;
public class Step1_2 : MonoBehaviour
{
    public Text tip;
    public GameObject safeBt;
    public Button finishBt;
    public GameObject selectBt;

    private void OnEnable()
    {
        tip.DOText("在对人员进行抢救时,确认周围的环境是否安全是很重要的,请旋转视角对周围环境进行确认,并在上方进行选择", 3);
        safeBt.GetComponent<RectTransform>().DOLocalMove(Vector3.zero, 2);
    }
    public void SafeFinish() {
        safeBt.SetActive(false);
        selectBt.GetComponent<RectTransform>().DOLocalMove(Vector3.zero,2);
        tip.text = "";
        tip.DOText("周围环境存在风险,请选择解决方式",2);
    }

    public void Remove() {
        tip.text = "";
        tip.DOText("请用鼠标进行点击,保持周边环境空旷(提示周边物品和靠的太近的人)", 2);
        selectBt.SetActive(false);
        finishBt.gameObject.SetActive(true);
        FindObjectOfType<CinemachineFreeLook>().m_Orbits[1].m_Radius = 3 ;
        FindObjectOfType<CinemachineFreeLook>().Follow = GameObject.FindWithTag("TargetPos").transform;
        FindObjectOfType<CinemachineFreeLook>().LookAt = GameObject.FindWithTag("TargetPos").transform;
    }
}