51 lines
1.7 KiB
C#
51 lines
1.7 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using ZXK.UTility;
|
|
/*******************************************************************************
|
|
*Create By CG
|
|
*Function 训练基类
|
|
*******************************************************************************/
|
|
namespace ZXK.ZPS
|
|
{
|
|
public class TrainBaseCtrl : MonoBehaviour
|
|
{
|
|
public virtual void ShowSecond()
|
|
{
|
|
transform.gameObject.SetActive(true);
|
|
}
|
|
|
|
public virtual void HideSecond()
|
|
{
|
|
transform.gameObject.SetActive(false);
|
|
}
|
|
|
|
public virtual bool ToolSubmitBtn(List<string> tools)
|
|
{
|
|
//提交的工具和需要的相同才可以继续
|
|
if (tools.Count == GameRoot.Instance._TrainMng._CurTrainInfo.Tools.Length)
|
|
{
|
|
foreach (string item in GameRoot.Instance._TrainMng._CurTrainInfo.Tools)
|
|
{
|
|
if (!tools.Contains(item))
|
|
{
|
|
//PopUpMng.PopVoiceAlert("选择错误,无法确认", 100);
|
|
PopUpMng.PopAlert("选择错误,无法确认", 100);
|
|
return false;
|
|
}
|
|
}
|
|
GameRoot.Instance._TrainMng.Play();
|
|
//GameRoot.Instance._DataUICtrl.NextProcess();
|
|
//PopUpMng.PopAlert($"请点击下一个科目{GameRoot.Instance._CurFirstProcess}-{GameRoot.Instance._NextSecondProcess}", 100);
|
|
HideSecond();
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
//PopUpMng.PopVoiceAlert("选择错误,无法确认", 100);
|
|
PopUpMng.PopAlert("选择错误,无法确认", 100);
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
} |