70 lines
1.9 KiB
C#
70 lines
1.9 KiB
C#
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++;
|
||
}
|
||
}
|
||
} |