TaiZhouCangChu_VRanime/Assets/Script/ModelAnimManager.cs

70 lines
1.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using DG.Tweening;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
namespace UnityStandardAssets.ImageEffects
{
public class ModelAnimManager : MonoBehaviour
{
public Text workDesc1;
public string animName1;
public Text workDesc2;
public string animName2;
public GameObject okBt;
public int index;
private void Awake()
{
index = 1;
}
private void Start()
{
StartAnim1();
}
public void StartAnim1()
{
workDesc1.DOText("我们需要将货物a从A点通过行吊设备安全运送到B点。在此过程中我们需确保货物的稳定避免任何可能的晃动或碰撞。到达B点后我们需将货物安全卸载并放置在指定位置。任务完成后我们需要清理工作现场并向上级汇报任务完成情况", 3).OnComplete(() => { okBt.SetActive(true); });
}
public void StartAnim2()
{
workDesc1.DOText("请使用行吊设备将货物a安全、准确地运送到B点。在操作过程中请确保货物的完好无损并遵守相关安全规定确保工作场所的安全。同时与相关人员保持沟通确保货物a按时送达B点。", 3).OnComplete(() => { okBt.SetActive(true); });
}
public void StartAnim3()
{
workDesc1.DOText("33333", 3).OnComplete(() => { okBt.SetActive(true); });
}
public void BtOK()
{
okBt.SetActive(false);
workDesc1.text = "";
if (index == 1)
{
StartAnim2();
}
else if (index == 2)
{
StartAnim3();
}
else if (index == 3)
{
SceneManager.LoadScene("");
}
index++;
}
}
}