diff --git a/Assets/Resources/Prefabs/高粱预制体.prefab b/Assets/Resources/Prefabs/高粱预制体.prefab
index c30b25e..f1958b2 100644
--- a/Assets/Resources/Prefabs/高粱预制体.prefab
+++ b/Assets/Resources/Prefabs/高粱预制体.prefab
@@ -242,13 +242,17 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
+ - target: {fileID: -7511558181221131132, guid: 51c3521496de1854697d5682cc43afe5, type: 3}
+ propertyPath: m_Enabled
+ value: 0
+ objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 51c3521496de1854697d5682cc43afe5, type: 3}
propertyPath: m_Name
value: "\u9AD8\u7CB1"
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 51c3521496de1854697d5682cc43afe5, type: 3}
propertyPath: m_IsActive
- value: 0
+ value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 51c3521496de1854697d5682cc43afe5, type: 3}
@@ -313,13 +317,17 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
+ - target: {fileID: -7511558181221131132, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3}
+ propertyPath: m_Enabled
+ value: 0
+ objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3}
propertyPath: m_Name
value: "\u9AD8\u7CB1"
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3}
propertyPath: m_IsActive
- value: 0
+ value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3}
diff --git a/Assets/Scripts/HQB/LoadPPTTest.cs b/Assets/Scripts/HQB/PPTManager.cs
similarity index 91%
rename from Assets/Scripts/HQB/LoadPPTTest.cs
rename to Assets/Scripts/HQB/PPTManager.cs
index e2710c5..0fc57fd 100644
--- a/Assets/Scripts/HQB/LoadPPTTest.cs
+++ b/Assets/Scripts/HQB/PPTManager.cs
@@ -12,39 +12,45 @@ using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
-public static class LoadPPTTest
+///
+/// PPT管理类
+///
+public class PPTManager : BaseManager
{
///
///
///
- private static Dictionary> texturesDic = new Dictionary>();
+ private Dictionary> texturesDic = new Dictionary>();
///
/// PPT所有路径
///
- private static string[] pptsPath = null;
+ private string[] pptsPath = null;
///
/// 加载单个课程所有图片
///
///
///
- public static List LoadPPTItems(string pptName)
+ public List LoadPPTItems(string pptName)
{
string pptPath = GetPPTPathByName(pptName);
return GetTexture2DsByName(pptName, pptPath);
//target.StartCoroutine(LoadAllPPTFiles(pptPath));
}
+ protected PPTManager()
+ {
+ }
- public static string[] PPTName()
+ public string[] PPTName()
{
///切割pptsPath
return pptsPath;
}
- private static List GetTexture2DsByName(string pptName, string pptPath)
+ private List GetTexture2DsByName(string pptName, string pptPath)
{
if (!texturesDic.ContainsKey(pptName))
{
@@ -66,7 +72,7 @@ public static class LoadPPTTest
///
/// 名称
///
- private static string GetPPTPathByName(string pptName)
+ private string GetPPTPathByName(string pptName)
{
foreach (var item in pptsPath)
{
@@ -80,7 +86,7 @@ public static class LoadPPTTest
/// 获取文件夹下所有.pptx文件
///
///
- public static void PPTFiles(string folderPath)
+ public void PPTFiles(string folderPath)
{
string fullPPTFolderPath = Path.Combine(Application.streamingAssetsPath, folderPath);
pptsPath = Directory.GetFiles(fullPPTFolderPath, "*.pptx");
@@ -113,7 +119,7 @@ public static class LoadPPTTest
// Debug.Log("所有PPT加载完成!");
//}
- public static List LoadAllPPTFiles(string folderPath)
+ public List LoadAllPPTFiles(string folderPath)
{
List texture2Ds = new List();
Presentation presentation = new Presentation(folderPath);
@@ -149,7 +155,7 @@ public static class LoadPPTTest
/// 分割ppt路径名称
///
///
- public static string PathName(string pptname)
+ public string PathName(string pptname)
{
if (string.IsNullOrEmpty(pptname))
{
@@ -166,7 +172,7 @@ public static class LoadPPTTest
///
/// 从文件名中提取开头的数字(如 "1-第一章" -> 返回 1)
///
- public static int ExtractLeadingNumber(string fileName)
+ public int ExtractLeadingNumber(string fileName)
{
if (string.IsNullOrEmpty(fileName)) return 0;
// 找到第一个数字序列
diff --git a/Assets/Scripts/HQB/LoadPPTTest.cs.meta b/Assets/Scripts/HQB/PPTManager.cs.meta
similarity index 100%
rename from Assets/Scripts/HQB/LoadPPTTest.cs.meta
rename to Assets/Scripts/HQB/PPTManager.cs.meta
diff --git a/Assets/Scripts/Project/Manager/GameManager.cs b/Assets/Scripts/Project/Manager/GameManager.cs
index ed74d0c..f475689 100644
--- a/Assets/Scripts/Project/Manager/GameManager.cs
+++ b/Assets/Scripts/Project/Manager/GameManager.cs
@@ -132,6 +132,10 @@ public class GameManager : SingletonAutoMono
///
public static MissionMgr MissionMgr { get; private set; }
+ ///
+ /// PPT管理类
+ ///
+ public static PPTManager PPTManager { get; private set; }
#endregion
///
@@ -161,6 +165,7 @@ public class GameManager : SingletonAutoMono
WorkorderMgr = WorkorderMgr.Instance; //工单管理初始化
FaultManager = FaultManager.Instance;
MissionMgr = MissionMgr.Instance;
+ PPTManager = PPTManager.Instance;
DataMgr.Init();
WorkorderMgr.Init();
NetMgr.Init(SendGet);
diff --git a/Assets/Scripts/Project/UI/UI_Panel/UI_PPTForPracticePanel.cs b/Assets/Scripts/Project/UI/UI_Panel/UI_PPTForPracticePanel.cs
index 19fb19c..997e936 100644
--- a/Assets/Scripts/Project/UI/UI_Panel/UI_PPTForPracticePanel.cs
+++ b/Assets/Scripts/Project/UI/UI_Panel/UI_PPTForPracticePanel.cs
@@ -29,16 +29,16 @@ public class UI_PPTForPracticePanel : BasePanel
canvasGroup.alpha = 1f;
pptFolderName = Application.streamingAssetsPath + "/PPT";
- LoadPPTTest.PPTFiles(pptFolderName);
+ GameManager.PPTManager.PPTFiles(pptFolderName);
- string[] ppts = LoadPPTTest.PPTName();
+ string[] ppts = GameManager.PPTManager.PPTName();
// 1. ȡļǰ
var sortedItems = ppts
.Select(path => new
{
Path = path,
- Name = LoadPPTTest.PathName(path),
- Order = LoadPPTTest.ExtractLeadingNumber(LoadPPTTest.PathName(path)) // ȡ
+ Name = GameManager.PPTManager.PathName(path),
+ Order = GameManager.PPTManager.ExtractLeadingNumber(GameManager.PPTManager.PathName(path)) // ȡ
})
.OrderBy(item => item.Order) //
.ToList();
@@ -134,7 +134,7 @@ public class UI_PPTForPracticePanel : BasePanel
default:
if (isOn)
{
- List textures = LoadPPTTest.LoadPPTItems(togglePath);
+ List textures = GameManager.PPTManager.LoadPPTItems(togglePath);
if (textures != null)
{
DisplayPPT(textures);
diff --git a/Assets/StreamingAssets/PPT/1-第一章 绪论.pptx b/Assets/StreamingAssets/PPT/1-第一章 绪论.pptx
new file mode 100644
index 0000000..f9877ec
Binary files /dev/null and b/Assets/StreamingAssets/PPT/1-第一章 绪论.pptx differ
diff --git a/Assets/StreamingAssets/PPT/1-第一章 绪论.pptx.meta b/Assets/StreamingAssets/PPT/1-第一章 绪论.pptx.meta
new file mode 100644
index 0000000..158047d
--- /dev/null
+++ b/Assets/StreamingAssets/PPT/1-第一章 绪论.pptx.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 845629668ba4fc24b8fb0ad514c78605
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/PPT/2-第二章 酿酒高粱的种类及分类.pptx b/Assets/StreamingAssets/PPT/2-第二章 酿酒高粱的种类及分类.pptx
new file mode 100644
index 0000000..ee033d6
Binary files /dev/null and b/Assets/StreamingAssets/PPT/2-第二章 酿酒高粱的种类及分类.pptx differ
diff --git a/Assets/StreamingAssets/PPT/2-第二章 酿酒高粱的种类及分类.pptx.meta b/Assets/StreamingAssets/PPT/2-第二章 酿酒高粱的种类及分类.pptx.meta
new file mode 100644
index 0000000..0169d69
--- /dev/null
+++ b/Assets/StreamingAssets/PPT/2-第二章 酿酒高粱的种类及分类.pptx.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d3b8ee9a7c9227245b07357e35e66ab7
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/PPT/3-第三章 酿酒高粱的生长发育.pptx b/Assets/StreamingAssets/PPT/3-第三章 酿酒高粱的生长发育.pptx
new file mode 100644
index 0000000..8011553
Binary files /dev/null and b/Assets/StreamingAssets/PPT/3-第三章 酿酒高粱的生长发育.pptx differ
diff --git a/Assets/StreamingAssets/PPT/3-第三章 酿酒高粱的生长发育.pptx.meta b/Assets/StreamingAssets/PPT/3-第三章 酿酒高粱的生长发育.pptx.meta
new file mode 100644
index 0000000..20792d3
--- /dev/null
+++ b/Assets/StreamingAssets/PPT/3-第三章 酿酒高粱的生长发育.pptx.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2200eae8244115b4ebd869e60a5619d2
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant: