This commit is contained in:
yulong 2024-03-06 16:44:41 +08:00
commit 8dcc160672
5 changed files with 1131 additions and 702 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1308,7 +1308,7 @@ RectTransform:
- {fileID: 7167972109621359833} - {fileID: 7167972109621359833}
- {fileID: 395436158516527757} - {fileID: 395436158516527757}
m_Father: {fileID: 122061599886375676} m_Father: {fileID: 122061599886375676}
m_RootOrder: 2 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.17183334, y: 0.03951852} m_AnchorMin: {x: 0.17183334, y: 0.03951852}
m_AnchorMax: {x: 0.99166673, y: 0.81962967} m_AnchorMax: {x: 0.99166673, y: 0.81962967}
@ -1984,7 +1984,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!224 &1480251055970303634 --- !u!224 &1480251055970303634
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2126,7 +2126,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 6611480634414415942} m_Father: {fileID: 6611480634414415942}
m_RootOrder: 0 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
@ -2198,7 +2198,7 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 122061599886375676} m_Father: {fileID: 6611480634414415942}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1480251056057912327 --- !u!114 &1480251056057912327
@ -2254,7 +2254,7 @@ Transform:
- {fileID: 1480251057036276748} - {fileID: 1480251057036276748}
- {fileID: 1480251056219242806} - {fileID: 1480251056219242806}
m_Father: {fileID: 6611480634414415942} m_Father: {fileID: 6611480634414415942}
m_RootOrder: 3 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1480251056131547296 --- !u!1 &1480251056131547296
GameObject: GameObject:
@ -2937,7 +2937,7 @@ RectTransform:
- {fileID: 1480251056723724231} - {fileID: 1480251056723724231}
- {fileID: 1480251057023120058} - {fileID: 1480251057023120058}
m_Father: {fileID: 6611480634414415942} m_Father: {fileID: 6611480634414415942}
m_RootOrder: 1 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -3090,7 +3090,7 @@ RectTransform:
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 6611480634414415942} m_Father: {fileID: 6611480634414415942}
m_RootOrder: 2 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -3192,7 +3192,7 @@ RectTransform:
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 5.700012, y: 0.000005722046} m_AnchoredPosition: {x: 5.700012, y: 0.000005722046}
m_SizeDelta: {x: 40, y: -0.0000076294} m_SizeDelta: {x: 40, y: -0.0000076294}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@ -4128,7 +4128,7 @@ RectTransform:
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0} m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@ -6082,7 +6082,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5} m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: 2114779.8} m_AnchoredPosition: {x: 0, y: 2119567.5}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &7554510022850465655 --- !u!114 &7554510022850465655
@ -6812,7 +6812,6 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1480251056057912326}
- {fileID: 986268761790548719} - {fileID: 986268761790548719}
- {fileID: 3963678744490064865} - {fileID: 3963678744490064865}
- {fileID: 6611480634414415942} - {fileID: 6611480634414415942}
@ -9178,7 +9177,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 6611480634414415942} m_Father: {fileID: 6611480634414415942}
m_RootOrder: 4 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1} m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
@ -10470,7 +10469,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &6611480634414415942 --- !u!224 &6611480634414415942
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -10480,15 +10479,16 @@ RectTransform:
m_GameObject: {fileID: 7815219803928858734} m_GameObject: {fileID: 7815219803928858734}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1480251056057912326}
- {fileID: 1480251055978339854} - {fileID: 1480251055978339854}
- {fileID: 1480251056369346847} - {fileID: 1480251056369346847}
- {fileID: 1480251056529467884} - {fileID: 1480251056529467884}
- {fileID: 1480251056072614865} - {fileID: 1480251056072614865}
- {fileID: 7464397899082591565} - {fileID: 7464397899082591565}
m_Father: {fileID: 122061599886375676} m_Father: {fileID: 122061599886375676}
m_RootOrder: 3 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
@ -11126,7 +11126,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 7882635801159145295} - {fileID: 7882635801159145295}
m_Father: {fileID: 122061599886375676} m_Father: {fileID: 122061599886375676}
m_RootOrder: 1 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}

View File

@ -91,8 +91,16 @@ public class DoublePlayMain : MonoBehaviour
EvaluatePanel.transform.localScale = isOn ? Vector3.zero : Vector3.one; EvaluatePanel.transform.localScale = isOn ? Vector3.zero : Vector3.one;
} }
); );
btn_video.onClick.AddListener(() => { VideoUi.transform.localScale = Vector3.one; }); btn_video.onClick.AddListener(() => {
btn_videoClose.onClick.AddListener(() => { VideoUi.transform.localScale = Vector3.zero; }); VideoUi.SetActive(true);
videolistmanager.VideoMain();
//VideoUi.transform.localScale = Vector3.one;
});
btn_videoClose.onClick.AddListener(() => {
VideoUi.SetActive(false);
//VideoUi.transform.localScale = Vector3.zero;
});
} }
// Update is called once per frame // Update is called once per frame

View File

@ -86,7 +86,7 @@ public class DropdownDouble : MonoBehaviour, IPointerClickHandler
DoublePlayMain.instance.doublePlayIntroduceList.IntroduceListShow(dataItem, traininginformation, optionIndex, subjectInfos[optionIndex]); DoublePlayMain.instance.doublePlayIntroduceList.IntroduceListShow(dataItem, traininginformation, optionIndex, subjectInfos[optionIndex]);
DoublePlayMain.instance.doublePlayEvaluatePanel.DoublePlayEvaluatePanelShow(dataItem, traininginformation, optionIndex, subjectInfos[optionIndex]); DoublePlayMain.instance.doublePlayEvaluatePanel.DoublePlayEvaluatePanelShow(dataItem, traininginformation, optionIndex, subjectInfos[optionIndex]);
DoublePlayMain.instance.videolistmanager._name = dataItem.Id; DoublePlayMain.instance.videolistmanager._name = dataItem.Id;
DoublePlayMain.instance.videolistmanager.VideoMain(); //DoublePlayMain.instance.videolistmanager.VideoMain();
} }
// 单击事件 // 单击事件
@ -96,6 +96,6 @@ public class DropdownDouble : MonoBehaviour, IPointerClickHandler
DoublePlayMain.instance.doublePlayIntroduceList.IntroduceListShow(dataItem, traininginformation, dropdown.value, subjectInfos[dropdown.value]); DoublePlayMain.instance.doublePlayIntroduceList.IntroduceListShow(dataItem, traininginformation, dropdown.value, subjectInfos[dropdown.value]);
DoublePlayMain.instance.doublePlayEvaluatePanel.DoublePlayEvaluatePanelShow(dataItem, traininginformation, dropdown.value, subjectInfos[dropdown.value]); DoublePlayMain.instance.doublePlayEvaluatePanel.DoublePlayEvaluatePanelShow(dataItem, traininginformation, dropdown.value, subjectInfos[dropdown.value]);
DoublePlayMain.instance.videolistmanager._name = dataItem.Id; DoublePlayMain.instance.videolistmanager._name = dataItem.Id;
DoublePlayMain.instance.videolistmanager.VideoMain(); //DoublePlayMain.instance.videolistmanager.VideoMain();
} }
} }

View File

@ -16,21 +16,23 @@ public class VideoListManager : MonoBehaviour
public VCR vCR; public VCR vCR;
void Start() void Start()
{ {
VideoMain(); //VideoMain();
} }
public void VideoMain() public void VideoMain()
{ {
folderPath = Application.streamingAssetsPath + "/Captures"; folderPath = Application.streamingAssetsPath + "/Captures";
string[] videoFiles = Directory.GetFiles(folderPath, "*.mp4"); // 获取指定文件夹内的所有 mp4 文件 string[] videoFiles = Directory.GetFiles(folderPath, "*.mp4"); // 获取指定文件夹内的所有 mp4 文件
string[] _videoFiles = new string[videoFiles.Length]; string[] _videoFiles = new string[videoFiles.Length];
string[] _videoFilesMy = new string[1]; string[] _videoFilesMy = new string[2];
foreach (string filePath in videoFiles) foreach (string filePath in videoFiles)
{ {
string fileName = Path.GetFileNameWithoutExtension(filePath); // 获取文件名(不带扩展名) string fileName = Path.GetFileNameWithoutExtension(filePath); // 获取文件名(不带扩展名)
if (fileName.Contains(_name)) if (fileName.Contains(_name))
{ {
_videoFilesMy[0] = fileName + ".mp4"; _videoFilesMy[0] = fileName + ".mp4";
_videoFilesMy[1] = fileName + ".mp4";
vCR._videoFiles = _videoFilesMy; vCR._videoFiles = _videoFilesMy;
vCR.OnOpenVideoFile();
} }
} }
} }