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.
59 lines
1.4 KiB
59 lines
1.4 KiB
4 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using AX.MessageSystem;
|
||
|
using System;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class FiremanMoveTrapped : MonoBehaviour
|
||
|
{
|
||
|
|
||
|
/// <summary>
|
||
|
/// 当前移动的被困人员集合,在移动到安全区域后移除被困人员。
|
||
|
/// </summary>
|
||
|
public List<long> trappedlist = new List<long>();
|
||
|
public GameObject GuidanceTrapped;
|
||
|
// Use this for initialization
|
||
|
|
||
|
|
||
|
public void OnEnable()
|
||
|
{
|
||
|
MessageDispatcher.AddListener("Trapped_Down", RemoveFollowTrapped);
|
||
|
}
|
||
|
|
||
|
public void OnDestroy()
|
||
|
{
|
||
|
MessageDispatcher.RemoveListener("Trapped_Down", RemoveFollowTrapped);
|
||
|
}
|
||
|
|
||
|
private void RemoveFollowTrapped(IMessage obj)
|
||
|
{
|
||
|
|
||
|
long trappedId = (long)obj.Data;
|
||
|
if (trappedlist.Count > 0)
|
||
|
{
|
||
|
for (int i = 0; i < trappedlist.Count; i++)
|
||
|
{
|
||
|
if (trappedId == trappedlist[i])
|
||
|
{
|
||
|
trappedlist.Remove(trappedId);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (trappedlist.Count<=0)
|
||
|
{
|
||
|
LoadPromptWin.Instance.LoadTextPromptWindow("跟随移动人员已昏迷",2f);
|
||
|
if (FireManSkillPanelController.Instance)
|
||
|
{
|
||
|
FireManSkillPanelController.Instance.Move.GetComponent<Toggle>().isOn = false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|