Skip to content

Commit 7bebc4c

Browse files
committed
提交
1 parent b95206e commit 7bebc4c

34 files changed

+552
-109
lines changed

Assets/Script/Core/Application/ApplicationManager.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public static ApplicationManager Instance
2323

2424
public bool m_useAssetsBundle = false;
2525

26+
27+
2628
public static AppMode AppMode
2729
{
2830
get
@@ -36,7 +38,7 @@ public static AppMode AppMode
3638
#else
3739
return instance.m_AppMode;
3840
#endif
39-
}
41+
}
4042
}
4143

4244
public bool UseAssetsBundle
@@ -59,6 +61,19 @@ public static string Version
5961
}
6062
}
6163

64+
public static SystemLanguage Langguage
65+
{
66+
get
67+
{
68+
return instance.langguage;
69+
}
70+
71+
set
72+
{
73+
instance.langguage = value;
74+
}
75+
}
76+
6277
[Tooltip("是否记录输入到本地")]
6378
public bool m_recordInput = true;
6479

@@ -72,6 +87,11 @@ public static string Version
7287
public List<string> m_globalLogic;
7388
[HideInInspector]
7489
public string currentStatus;
90+
91+
/// <summary>
92+
/// 语言
93+
/// </summary>
94+
public SystemLanguage langguage = SystemLanguage.ChineseSimplified;
7595
/// <summary>
7696
/// 显示括号标识多语言转换的字段
7797
/// </summary>

Assets/Script/Core/AudioManager/AudioButtonClickComponent.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ void Awake ()
1919

2020
private void OnClick()
2121
{
22-
AudioPlayManager.PlaySFX2D(audioName, volume);
22+
if (ResourcesConfigManager.GetIsExitRes(audioName))
23+
{
24+
AudioPlayManager.PlaySFX2D(audioName, volume);
25+
}
26+
else
27+
{
28+
Debug.LogError("不存在音频文件:" + audioName);
29+
}
2330
}
2431
}

Assets/Script/Core/Config/ConfigManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using FrameWork;
55
using System.Text;
66
using System;
7-
using LuaInterface;
87

98
/// <summary>
109
/// 配置管理器,只读

Assets/Script/Core/Data/DataTable.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,24 @@ public void SetFieldType(string key,FieldType type ,string enumType)
491491
}
492492
}
493493

494+
public void SetAssetTypes(string key, DataFieldAssetType type)
495+
{
496+
//主键只能是String类型
497+
if (key == TableKeys[0])
498+
{
499+
return;
500+
}
501+
502+
if (m_fieldAssetTypes.ContainsKey(key))
503+
{
504+
m_fieldAssetTypes[key] = type;
505+
}
506+
else
507+
{
508+
m_fieldAssetTypes.Add(key, type);
509+
}
510+
}
511+
494512
public SingleData GetLineFromKey(string key)
495513
{
496514
//主键只能是String类型

Assets/Script/Core/Develop/Log.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,19 @@ public static void Init(bool isOpenLog = true)
2222
if (isOpenLog)
2323
{
2424
s_LogOutPutThread.Init();
25+
ApplicationManager.s_OnApplicationQuit += OnApplicationQuit;
2526
Application.logMessageReceivedThreaded += UnityLogCallBackThread;
2627
Application.logMessageReceived += UnityLogCallBack;
2728
}
2829
}
2930

31+
private static void OnApplicationQuit()
32+
{
33+
Application.logMessageReceivedThreaded -= UnityLogCallBackThread;
34+
Application.logMessageReceived -= UnityLogCallBack;
35+
s_LogOutPutThread.Close();
36+
}
37+
3038
static void UnityLogCallBackThread(string log, string track, LogType type)
3139
{
3240
LogInfo l_logInfo = new LogInfo

Assets/Script/Core/Develop/LogOutPutThread.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void Init()
2121
#if !(UNITY_WEBGL && !UNITY_EDITOR)
2222
try
2323
{
24-
ApplicationManager.s_OnApplicationQuit += Close;
24+
// ApplicationManager.s_OnApplicationQuit += Close;
2525

2626
string prefix = Application.productName;
2727

Assets/Script/Core/Editor/Data/Extends.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Script/Core/Editor/Data/TableDataEditor.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,16 @@ private DataFieldAssetType GetDataFieldAssetType(string field)
723723

724724
private FieldType GetFieldType(int index, string field)
725725
{
726-
FieldType fieldValueType = index == 0 ? FieldType.String : m_currentData.m_tableTypes[field];
727-
return fieldValueType;
726+
try
727+
{
728+
FieldType fieldValueType = index == 0 ? FieldType.String : m_currentData.m_tableTypes[field];
729+
return fieldValueType;
730+
}
731+
catch(Exception e)
732+
{
733+
Debug.Log("field " + field + " exception " + e.ToString());
734+
return FieldType.String;
735+
}
728736
}
729737
private string GetEnumType(FieldType fieldValueType, string field)
730738
{

Assets/Script/Core/Editor/General/GeneralDataModificationWindow.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ private void OnGUI()
6969
});
7070

7171
GUILayout.FlexibleSpace();
72+
bool isClose = false;
7273
EditorDrawGUIUtil.DrawHorizontalCenter(() =>
7374
{
7475
if (GUILayout.Button("OK",GUILayout.Width( position.width/4)))
@@ -84,14 +85,17 @@ private void OnGUI()
8485
}
8586
if (otherWindow)
8687
otherWindow.Repaint();
87-
Close();
88+
isClose = true;
8889
}
8990

9091
if (GUILayout.Button("Cancel", GUILayout.Width(position.width / 4)))
9192
{
92-
Close();
93+
isClose = true;
9394
}
9495
});
9596
GUILayout.Space(6);
97+
98+
if (isClose)
99+
Close();
96100
}
97101
}

Assets/Script/Core/Editor/Language/LanguageDataEditorUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static void SaveData(SystemLanguage langeuageName, string fullkeyFileName
2020
string text = DataTable.Serialize(data);
2121

2222
FileUtils.CreateTextFile(path, text);
23-
UnityEditor.AssetDatabase.Refresh();
23+
2424
}
2525

2626
/// <summary>

0 commit comments

Comments
 (0)