Skip to content

Commit f01ca82

Browse files
committed
提交
1 parent 5e99468 commit f01ca82

File tree

60 files changed

+1284
-192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1284
-192
lines changed

Assets/Script/Core/AnimSystem/AnimData.cs

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,11 @@ public void BezierInit()
360360
if (m_fromV3.z == m_toV3.z)
361361
{
362362
m_v3Contral[0].z = m_fromV3.z;
363-
m_v3Contral[1].z = m_toV3.z;
363+
if (m_v3Contral.Length > 1)
364+
{
365+
m_v3Contral[1].z = m_toV3.z;
366+
}
367+
364368
}
365369
}
366370
/// <summary>
@@ -768,28 +772,36 @@ float GetInterpolation(float oldValue, float aimValue)
768772
{
769773
case InterpType.Default:
770774
case InterpType.Linear: return Mathf.Lerp(oldValue, aimValue, m_currentTime / m_totalTime);
775+
771776
case InterpType.InBack: return InBack(oldValue, aimValue, m_currentTime, m_totalTime);
772777
case InterpType.OutBack: return OutBack(oldValue, aimValue, m_currentTime, m_totalTime);
773778
case InterpType.InOutBack: return InOutBack(oldValue, aimValue, m_currentTime, m_totalTime);
774779
case InterpType.OutInBack: return OutInBack(oldValue, aimValue, m_currentTime, m_totalTime);
780+
775781
case InterpType.InQuad: return InQuad(oldValue, aimValue, m_currentTime, m_totalTime);
776782
case InterpType.OutQuad: return OutQuad(oldValue, aimValue, m_currentTime, m_totalTime);
777783
case InterpType.InoutQuad: return InoutQuad(oldValue, aimValue, m_currentTime, m_totalTime);
784+
778785
case InterpType.InCubic: return InCubic(oldValue, aimValue, m_currentTime, m_totalTime);
779786
case InterpType.OutCubic: return OutCubic(oldValue, aimValue, m_currentTime, m_totalTime);
780787
case InterpType.InoutCubic: return InoutCubic(oldValue, aimValue, m_currentTime, m_totalTime);
788+
case InterpType.OutInCubic: return OutinCubic(oldValue, aimValue, m_currentTime, m_totalTime);
789+
781790
case InterpType.InQuart: return InQuart(oldValue, aimValue, m_currentTime, m_totalTime);
782791
case InterpType.OutQuart: return OutQuart(oldValue, aimValue, m_currentTime, m_totalTime);
783792
case InterpType.InOutQuart: return InOutQuart(oldValue, aimValue, m_currentTime, m_totalTime);
784793
case InterpType.OutInQuart: return OutInQuart(oldValue, aimValue, m_currentTime, m_totalTime);
794+
785795
case InterpType.InQuint: return InQuint(oldValue, aimValue, m_currentTime, m_totalTime);
786796
case InterpType.OutQuint: return OutQuint(oldValue, aimValue, m_currentTime, m_totalTime);
787797
case InterpType.InOutQuint: return InOutQuint(oldValue, aimValue, m_currentTime, m_totalTime);
788798
case InterpType.OutInQuint: return OutInQuint(oldValue, aimValue, m_currentTime, m_totalTime);
799+
789800
case InterpType.InSine: return InSine(oldValue, aimValue, m_currentTime, m_totalTime);
790801
case InterpType.OutSine: return OutSine(oldValue, aimValue, m_currentTime, m_totalTime);
791802
case InterpType.InOutSine: return InOutSine(oldValue, aimValue, m_currentTime, m_totalTime);
792803
case InterpType.OutInSine: return OutInSine(oldValue, aimValue, m_currentTime, m_totalTime);
804+
793805
case InterpType.InExpo: return InExpo(oldValue, aimValue, m_currentTime, m_totalTime);
794806
case InterpType.OutExpo: return OutExpo(oldValue, aimValue, m_currentTime, m_totalTime);
795807
case InterpType.InOutExpo: return InOutExpo(oldValue, aimValue, m_currentTime, m_totalTime);
@@ -1013,6 +1025,21 @@ public float InoutCubic(float b, float to, float t, float d)
10131025
return c / 2 * (t * t * t + 2) + b;
10141026
}
10151027
}
1028+
1029+
public float OutinCubic(float b, float to, float t, float d)
1030+
{
1031+
float c = to - b;
1032+
1033+
if (t < d / 2)
1034+
{
1035+
return OutCubic( b, b + c / 2, t * 2, d);
1036+
}
1037+
else
1038+
{
1039+
return InCubic( b + c / 2, to, (t * 2) - d, d);
1040+
}
1041+
}
1042+
10161043
public float InQuart(float b, float to, float t, float d)
10171044
{
10181045
float c = to - b;

Assets/Script/Core/Application/ApplicationManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public static ApplicationManager Instance
1313
if (instance == null)
1414
{
1515
instance = FindObjectOfType<ApplicationManager>();
16+
1617
}
1718
return ApplicationManager.instance; }
1819
set { ApplicationManager.instance = value; }

Assets/Script/Core/Application/ApplicationStatusManager.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,17 @@ public static void EnterTestModel(string statusName)
241241

242242
s_currentAppStatus = GetStatus(statusName);
243243

244-
ApplicationManager.Instance.StartCoroutine(s_currentAppStatus.InChangeScene(()=>{
244+
if(ApplicationManager.AppMode != AppMode.Release)
245+
{
245246
s_currentAppStatus.EnterStatusTestData();
246-
s_currentAppStatus.OnEnterStatus();
247-
}));
247+
}
248+
249+
s_currentAppStatus.OnEnterStatus();
250+
251+
252+
//ApplicationManager.Instance.StartCoroutine(s_currentAppStatus.InChangeScene(()=>{
253+
// s_currentAppStatus.EnterStatusTestData();
254+
// s_currentAppStatus.OnEnterStatus();
255+
//}));
248256
}
249257
}

Assets/Script/Core/Application/IApplicationStatus.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public abstract class IApplicationStatus
88
#region UI 管理
99

1010
List<UIWindowBase> m_uiList = new List<UIWindowBase>();
11+
1112
/// <summary>
1213
/// 获取现在ApplicationStatus管理的打开的UI的个数
1314
/// </summary>
@@ -16,6 +17,12 @@ public int GetUIListCount()
1617
{
1718
return m_uiList.Count;
1819
}
20+
21+
public List<UIWindowBase> GetUIList()
22+
{
23+
return m_uiList;
24+
}
25+
1926
/// <summary>
2027
/// 获取status打开的window的最上层Window
2128
/// </summary>
@@ -27,6 +34,17 @@ public UIWindowBase GetStatusTopUIWindow()
2734

2835
return null;
2936
}
37+
38+
public UIWindowBase GetUI(string name)
39+
{
40+
foreach (var item in m_uiList)
41+
{
42+
if (item.name == name)
43+
return item;
44+
}
45+
return null;
46+
}
47+
3048
public T OpenUI<T>() where T: UIWindowBase
3149
{
3250
UIWindowBase ui = UIManager.OpenUIWindow<T>();
@@ -35,6 +53,7 @@ public T OpenUI<T>() where T: UIWindowBase
3553

3654
return (T)ui;
3755
}
56+
3857
public UIWindowBase OpenUI(string name)
3958
{
4059
UIWindowBase ui = UIManager.OpenUIWindow(name);

Assets/Script/Core/AudioManager/AudioButtonClickComponent.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
using FrameWork.SDKManager;
2+
using System;
23
using System.Collections;
34
using System.Collections.Generic;
45
using UnityEngine;
@@ -20,6 +21,4 @@ private void OnClick()
2021
{
2122
AudioPlayManager.PlaySFX2D(audioName, volume);
2223
}
23-
24-
2524
}

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
public class TableDataEditor
1212
{
1313
private const string FontPlayerPrefKey = "DataEditorWindow.FontKey";
14+
1415
List<String> configFileNames = new List<string>();
1516

1617
DataTable m_currentData;
@@ -26,7 +27,11 @@ public void Init(EditorWindow editorWindow)
2627

2728
configFileNames.Clear();
2829
string m_directoryPath = Application.dataPath + "/Resources/" + DataManager.c_directoryName;
29-
configFileNames.AddRange(PathUtils.GetDirectoryFileNames(m_directoryPath, new string[] { ".txt" }, false, false));
30+
31+
if(Directory.Exists(m_directoryPath))
32+
{
33+
configFileNames.AddRange(PathUtils.GetDirectoryFileNames(m_directoryPath, new string[] { ".txt" }, false, false));
34+
}
3035

3136
if (!string.IsNullOrEmpty(chooseFileName) && configFileNames.Contains(chooseFileName))
3237
LoadData(chooseFileName);
@@ -82,7 +87,8 @@ void ChooseFile()
8287
File.Delete(Application.dataPath + "/Resources/" + DataManager.c_directoryName + "/" + chooseFileName + ".txt");
8388
AssetDatabase.Refresh();
8489
m_currentData = null;
85-
Init(null);
90+
GlobalEvent.DispatchEvent(EditorEvent.LanguageDataEditorChange);
91+
// Init(null);
8692
return;
8793
}
8894
}
@@ -127,10 +133,11 @@ void ChooseFile()
127133
{
128134
DataTable data = new DataTable();
129135
string keyName = GeneralDataModificationWindow.otherParameter.ToString();
136+
chooseFileName = value.ToString();
130137
data.TableKeys.Add(keyName);
131-
SaveData(value.ToString(), data);
132-
Init(null);
133-
LoadData(value.ToString());
138+
SaveData(chooseFileName, data);
139+
GlobalEvent.DispatchEvent(EditorEvent.LanguageDataEditorChange);
140+
LoadData(chooseFileName);
134141
AssetDatabase.Refresh();
135142
});
136143
}
@@ -949,9 +956,12 @@ private object DrawTableGUI(string text, object defultValue)
949956
private object DrawLocalizedLanguageField(string text, object value)
950957
{
951958
value = EditorDrawGUIUtil.DrawBaseValue(text, value);
959+
952960
if ("null" != value.ToString())
953961
{
954962
value = EditorDrawGUIUtil.DrawPopup(text, value.ToString(), langKeys);
963+
if (value==null)
964+
value = "null";
955965
GUILayout.Space(6);
956966
GUILayout.Label("多语言字段[" + value + "] : " + LanguageManager.GetContentByKey(value.ToString()));
957967
GUILayout.Space(8);

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections;
1+
using System;
2+
using System.Collections;
23
using System.Collections.Generic;
34
using UnityEditor;
45
using UnityEngine;
@@ -24,6 +25,7 @@ private void OnEnable()
2425
GlobalEvent.AddEvent(EditorEvent.LanguageDataEditorChange, Refresh);
2526
}
2627

28+
2729
private void OnGUI()
2830
{
2931
chooseFileName= editor.OnGUI(chooseFileName);

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
using UnityEngine.SceneManagement;
99
using UnityObject = UnityEngine.Object;
1010

11-
11+
/// <summary>
12+
/// 绘制文件数状目录
13+
/// </summary>
1214
public class FolderTreeView : TreeView
1315
{
1416
/// <summary>
@@ -87,7 +89,7 @@ private List<FolderTreeViewItem> GetFolderRows()
8789
protected override TreeViewItem BuildRoot()
8890
{
8991
FolderTreeViewItem root = new FolderTreeViewItem { id = 0, depth = -1, displayName = "Root" };
90-
92+
root.children = new List<TreeViewItem>();
9193
var rows = GetFolderRows();
9294
if (allPath == null)
9395
return root;

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

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
using HDJ.Framework.Utils;
22
using System;
33
using System.Collections.Generic;
4+
using System.IO;
45
using System.Linq;
56
using System.Text;
67
using UnityEngine;
78

89
public class LanguageDataEditorUtils
910
{
1011

11-
1212
#region 加载/保存编辑器设置
1313

1414
public static void SaveData(SystemLanguage langeuageName, string fullkeyFileName, DataTable data)
@@ -33,13 +33,16 @@ public static List<string> LoadLangusgeAllFileNames(SystemLanguage language)
3333
List<string> datas = new List<string>();
3434

3535
string pathDir = LanguageDataUtils.SavePathDir + language;
36-
string[] fileNames = PathUtils.GetDirectoryFileNames(pathDir, new string[] { ".txt" });
37-
foreach (var item in fileNames)
36+
if (Directory.Exists(pathDir))
3837
{
39-
string temp = item.Replace(LanguageManager.c_DataFilePrefix + language + "_", "").Replace("_", "/");
40-
if (string.IsNullOrEmpty(temp))
41-
continue;
42-
datas.Add(temp);
38+
string[] fileNames = PathUtils.GetDirectoryFileNames(pathDir, new string[] { ".txt" });
39+
foreach (var item in fileNames)
40+
{
41+
string temp = item.Replace(LanguageManager.c_DataFilePrefix + language + "_", "").Replace("_", "/");
42+
if (string.IsNullOrEmpty(temp))
43+
continue;
44+
datas.Add(temp);
45+
}
4346
}
4447
return datas;
4548
}
@@ -50,15 +53,21 @@ public static List<string> GetLanguageAllFunKeyList()
5053
{
5154
List<string> list = new List<string>();
5255
LanguageSettingConfig config = LanguageDataUtils.LoadEditorConfig();
53-
List<string> allFilePath = LoadLangusgeAllFileNames(config.defaultLanguage);
54-
foreach (var item in allFilePath)
56+
57+
if(config != null)
5558
{
56-
DataTable data = LanguageDataUtils.LoadFileData(config.defaultLanguage, item);
57-
foreach (var key in data.TableIDs)
59+
List<string> allFilePath = LoadLangusgeAllFileNames(config.defaultLanguage);
60+
foreach (var item in allFilePath)
5861
{
59-
list.Add(item + "/" + key);
62+
DataTable data = LanguageDataUtils.LoadFileData(config.defaultLanguage, item);
63+
foreach (var key in data.TableIDs)
64+
{
65+
list.Add(item + "/" + key);
66+
}
6067
}
6168
}
69+
70+
6271
return list;
6372
}
6473
}

0 commit comments

Comments
 (0)