168 lines
6.8 KiB
C#
168 lines
6.8 KiB
C#
|
|
using DG.Tweening;
|
|||
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
using UnityEngine.UI;
|
|||
|
|
using ZXK.Framework;
|
|||
|
|
using ZXK.UTility;
|
|||
|
|
|
|||
|
|
namespace ZXK.BYSS {
|
|||
|
|
public class JiaoXueYinDaoBtn : UIBase
|
|||
|
|
{
|
|||
|
|
public Button _JiaoXueYinDaoBtn;
|
|||
|
|
public Transform _videoTran;
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
protected override void Awake()
|
|||
|
|
{
|
|||
|
|
base.Awake();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
private void Start()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
|
|||
|
|
//<2F><>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>
|
|||
|
|
//UI<55>¼<EFBFBD>ע<EFBFBD><D7A2>
|
|||
|
|
if (AppManagement.Instance._CurModel == EnumCtrl.Model.Teach)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ͬ<EFBFBD>Ľ<EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť
|
|||
|
|
if (AppManagement.Instance._CurType==EnumCtrl.Type.BYSS)
|
|||
|
|
{
|
|||
|
|
//5<><35>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>
|
|||
|
|
//<2F>豸<EFBFBD><E8B1B8>װ<EFBFBD><D7B0><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD>ߣ<EFBFBD><DFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD><D8A3>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
|||
|
|
GetWedage("ByssJiaoXue1_N").transform.gameObject.SetActive(true);
|
|||
|
|
GetWedage("ByssJiaoXue2_N").transform.gameObject.SetActive(true);
|
|||
|
|
GetWedage("ByssJiaoXue3_N").transform.gameObject.SetActive(true);
|
|||
|
|
GetWedage("ByssJiaoXue4_N").transform.gameObject.SetActive(true);
|
|||
|
|
GetWedage("ByssJiaoXue5_N").transform.gameObject.SetActive(true);
|
|||
|
|
|
|||
|
|
GetWedage("JiaoXueYinDaoBtn_N").gameObject.SetActive(false);
|
|||
|
|
//<2F><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>
|
|||
|
|
Transform top = GameObject.FindGameObjectWithTag("MainCanvas").transform.parent.Find("TopCanvas");
|
|||
|
|
UIBase vcrPanel = UI_Manage.Instance.ShowPanel("VCRPanel", -1, top);
|
|||
|
|
_videoTran = vcrPanel.gameObject.transform;
|
|||
|
|
_videoTran.gameObject.SetActive(false);
|
|||
|
|
_videoTran.localScale = Vector3.zero;
|
|||
|
|
AddEventListener("ByssJiaoXue1_N", UIEventType.OnButtonClick,()=> {
|
|||
|
|
|
|||
|
|
_videoTran.DOScale(1.0f, 0.5f);
|
|||
|
|
_videoTran.gameObject.SetActive(true);
|
|||
|
|
|
|||
|
|
string _videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_BYSS1_PATH;
|
|||
|
|
_videoTran.GetComponent<VCRCustom>().OnOpenVideoFile(_videoPath);
|
|||
|
|
});
|
|||
|
|
AddEventListener("ByssJiaoXue2_N", UIEventType.OnButtonClick,()=> {
|
|||
|
|
|
|||
|
|
_videoTran.DOScale(1.0f, 0.5f);
|
|||
|
|
_videoTran.gameObject.SetActive(true);
|
|||
|
|
|
|||
|
|
string _videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_BYSS2_PATH;
|
|||
|
|
_videoTran.GetComponent<VCRCustom>().OnOpenVideoFile(_videoPath);
|
|||
|
|
});
|
|||
|
|
AddEventListener("ByssJiaoXue3_N", UIEventType.OnButtonClick,()=> {
|
|||
|
|
|
|||
|
|
_videoTran.DOScale(1.0f, 0.5f);
|
|||
|
|
_videoTran.gameObject.SetActive(true);
|
|||
|
|
|
|||
|
|
string _videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_BYSS3_PATH;
|
|||
|
|
_videoTran.GetComponent<VCRCustom>().OnOpenVideoFile(_videoPath);
|
|||
|
|
});
|
|||
|
|
AddEventListener("ByssJiaoXue4_N", UIEventType.OnButtonClick,()=> {
|
|||
|
|
|
|||
|
|
_videoTran.DOScale(1.0f, 0.5f);
|
|||
|
|
_videoTran.gameObject.SetActive(true);
|
|||
|
|
string _videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_BYSS4_PATH;
|
|||
|
|
_videoTran.GetComponent<VCRCustom>().OnOpenVideoFile(_videoPath);
|
|||
|
|
});
|
|||
|
|
AddEventListener("ByssJiaoXue5_N", UIEventType.OnButtonClick,()=> {
|
|||
|
|
|
|||
|
|
_videoTran.DOScale(1.0f, 0.5f);
|
|||
|
|
_videoTran.gameObject.SetActive(true);
|
|||
|
|
|
|||
|
|
string _videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_BYSS5_PATH;
|
|||
|
|
_videoTran.GetComponent<VCRCustom>().OnOpenVideoFile(_videoPath);
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
GetWedage("ByssJiaoXue1_N").transform.gameObject.SetActive(false);
|
|||
|
|
GetWedage("ByssJiaoXue2_N").transform.gameObject.SetActive(false);
|
|||
|
|
GetWedage("ByssJiaoXue3_N").transform.gameObject.SetActive(false);
|
|||
|
|
GetWedage("ByssJiaoXue4_N").transform.gameObject.SetActive(false);
|
|||
|
|
GetWedage("ByssJiaoXue5_N").transform.gameObject.SetActive(false);
|
|||
|
|
|
|||
|
|
|
|||
|
|
_JiaoXueYinDaoBtn = GetWedage("JiaoXueYinDaoBtn_N").transform.GetComponent<Button>();
|
|||
|
|
_JiaoXueYinDaoBtn.gameObject.SetActive(true);
|
|||
|
|
//TODO
|
|||
|
|
//<2F><>ʱ<EFBFBD>ý<EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť
|
|||
|
|
Transform top = GameObject.FindGameObjectWithTag("MainCanvas").transform.parent.Find("TopCanvas");
|
|||
|
|
//<2F><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>
|
|||
|
|
UIBase vcrPanel = UI_Manage.Instance.ShowPanel("VCRPanel", -1, top);
|
|||
|
|
_videoTran = vcrPanel.gameObject.transform;
|
|||
|
|
_videoTran.gameObject.SetActive(false);
|
|||
|
|
_videoTran.localScale = Vector3.zero;
|
|||
|
|
//<2F><>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD><C5A5><EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>
|
|||
|
|
AddEventListener("JiaoXueYinDaoBtn_N", UIEventType.OnButtonClick, () =>
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
_videoTran.DOScale(1.0f, 0.5f);
|
|||
|
|
_videoTran.gameObject.SetActive(true);
|
|||
|
|
//TODO
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>ַ
|
|||
|
|
string _videoPath;
|
|||
|
|
_videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_CLFJ_PATH;
|
|||
|
|
switch (AppManagement.Instance._CurType)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
case EnumCtrl.Type.XHBY:
|
|||
|
|
_videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_XHBY_PATH;
|
|||
|
|
break;
|
|||
|
|
case EnumCtrl.Type.QDCY:
|
|||
|
|
_videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_QDCY_PATH;
|
|||
|
|
break;
|
|||
|
|
case EnumCtrl.Type.CLFJ:
|
|||
|
|
_videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_CLFJ_PATH;
|
|||
|
|
break;
|
|||
|
|
case EnumCtrl.Type.ZNYD:
|
|||
|
|
_videoPath = Application.streamingAssetsPath + ConstCtrl.VIDEO_ZNYD_PATH;
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
_videoTran.GetComponent<VCRCustom>().OnOpenVideoFile(_videoPath);
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
//_JiaoXueYinDaoBtn = GetWedage("JiaoXueYinDaoBtn_N").GetComponent<Button>();
|
|||
|
|
//_JiaoXueYinDaoBtn.gameObject.SetActive(false);
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|