Skip to content

Commit 36d8524

Browse files
committed
更新
1 parent 54ddf0d commit 36d8524

File tree

102 files changed

+2317
-150
lines changed

Some content is hidden

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

102 files changed

+2317
-150
lines changed

Assets/Script/Core/Application/ApplicationManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ public static SystemLanguage Langguage
6565
{
6666
get
6767
{
68-
return instance.langguage;
68+
if (Application.isPlaying)
69+
return instance.langguage;
70+
else
71+
return Application.systemLanguage;
6972
}
7073

7174
set

Assets/Script/Core/Develop/DevelopReplayManager.cs

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Collections.Generic;
44
using System.IO;
55
using System;
6-
using FrameWork;
76

87
public class DevelopReplayManager
98
{
@@ -51,6 +50,8 @@ public static Action OnLunchCallBack
5150
set { s_onLunchCallBack = value; }
5251
}
5352

53+
#region Init
54+
5455
public static void Init(bool isQuickLunch)
5556
{
5657

@@ -151,6 +152,8 @@ public static void OnGetRandomCallBack(int random)
151152
WriteRandomRecord(random);
152153
}
153154

155+
#endregion
156+
154157
#region SaveReplayFile
155158

156159
static void OpenWriteFileStream(string fileName)
@@ -277,6 +280,16 @@ static void LoadRandomList(string[] content)
277280

278281
#endregion
279282

283+
#region SaveScreenShot
284+
285+
static void SaveScreenShot(string fileName)
286+
{
287+
FileTool.CreatFilePath(fileName);
288+
UnityEngine.ScreenCapture.CaptureScreenshot(fileName);
289+
}
290+
291+
#endregion
292+
280293
#region GUI
281294

282295
static int margin = 3;
@@ -760,6 +773,14 @@ static void DevelopHotKeyLogic()
760773

761774
Time.timeScale *= 0.5f;
762775
}
776+
777+
if (Input.GetKeyDown(KeyCode.F12))
778+
{
779+
string name = GetScreenshotFileName();
780+
Debug.Log("已保存 屏幕截图 " + name);
781+
782+
SaveScreenShot(name);
783+
}
763784
}
764785

765786
#endregion
@@ -884,7 +905,7 @@ static string GetHotKey(int fn,bool isShowInRun = true)
884905

885906
#endregion
886907

887-
#region Update
908+
#region Update
888909

889910
static float s_currentTime = 0;
890911

@@ -919,7 +940,9 @@ static void OnRecordUpdate()
919940
s_currentTime += Time.deltaTime;
920941
}
921942

922-
#endregion
943+
#endregion
944+
945+
#region Tool
923946

924947
public static string[] GetRelpayFileNames()
925948
{
@@ -948,6 +971,24 @@ static string GetReplayFileName()
948971
return logName;
949972
}
950973

974+
static string GetScreenshotFileName()
975+
{
976+
DateTime now = System.DateTime.Now;
977+
//string screenshotName = string.Format("Screenshot{0}-{1:D2}-{2:D2}#{3:D2}-{4:D2}-{5:D2}",
978+
// now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second);
979+
980+
string screenshotName = string.Format("ScreenShot_{0}x{1}_{2}", Screen.width, Screen.height, System.DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds);
981+
982+
983+
string path = PathTool.GetAbsolutePath(ResLoadLocation.Persistent,
984+
PathTool.GetRelativelyPath(
985+
"ScreenShot",
986+
screenshotName,
987+
"jpg"));
988+
989+
return path;
990+
}
991+
951992
static void UploadCallBack(string result)
952993
{
953994
GUIUtil.ShowTips(result);
@@ -960,4 +1001,6 @@ enum DevMenuEnum
9601001
Log,
9611002
PersistentFile
9621003
}
1004+
1005+
#endregion
9631006
}

Assets/Script/Core/Editor/UI/UICreateService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static void CreateUICamera(UIManager UIManager,string key, float cameraDe
4545
//UIcamera
4646
GameObject cameraGo = new GameObject("UICamera");
4747
cameraGo.transform.SetParent(canvas.transform);
48-
cameraGo.transform.localPosition = new Vector3(0, 0, -1000);
48+
cameraGo.transform.localPosition = new Vector3(0, 0, -5000);
4949
Camera camera = cameraGo.AddComponent<Camera>();
5050
camera.cullingMask = LayerMask.GetMask("UI");
5151
camera.orthographic = true;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using UnityEditor;
5+
using System;
6+
using HDJ.Framework.Utils;
7+
8+
public class String2MD5Window : EditorWindow
9+
{
10+
[MenuItem("Window/String转MD5(1003)", priority = 1003)]
11+
private static void OpenWindow()
12+
{
13+
String2MD5Window win = GetWindow<String2MD5Window>();
14+
win.autoRepaintOnSceneChange = true;
15+
win.wantsMouseMove = true;
16+
EditorWindow.FocusWindowIfItsOpen<String2MD5Window>();
17+
win.Init();
18+
}
19+
20+
private void Init()
21+
{
22+
23+
}
24+
25+
string inputText = "";
26+
string resText = "";
27+
private void OnGUI()
28+
{
29+
GUILayout.FlexibleSpace();
30+
GUILayout.Space(5);
31+
GUILayout.BeginHorizontal();
32+
inputText = EditorDrawGUIUtil.DrawBaseValue("输入字符串:", inputText).ToString();
33+
if (GUILayout.Button("转换"))
34+
{
35+
resText= MD5Utils.GetObjectMD5(inputText);
36+
}
37+
GUILayout.EndHorizontal();
38+
39+
EditorDrawGUIUtil.DrawBaseValue("MD5:", resText);
40+
GUILayout.FlexibleSpace();
41+
}
42+
}

Assets/Script/Core/Network/Message/AdmiLogin2Client.cs.meta renamed to Assets/Script/Core/Editor/Utils/String2MD5Window.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Script/Core/Effect/CameraFade.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,16 @@ private void Update()
159159

160160
private void RunComplete(CameraFadeData data)
161161
{
162-
if (data.completeCallBack != null)
163-
{
164-
data.completeCallBack();
165-
}
166162
if (currentFadeDatas.Contains(data))
167163
{
168164
currentFadeDatas.Remove(data);
169165
cacheData.Add(data);
170166
}
167+
if (data.completeCallBack != null)
168+
{
169+
data.completeCallBack();
170+
}
171+
171172
if (FadeCompleteCallBack != null)
172173
{
173174
FadeCompleteCallBack();

Assets/Script/Core/HotUpdate/HotUpdateManager.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ public static void StartHotUpdate(HotUpdateCallBack CallBack)
4545
Init();
4646

4747
//检查Streaming版本和Persistent版本哪一个更新
48-
if(!CheckLocalVersion())
48+
if (!CheckLocalVersion())
4949
{
5050
return;
5151
}
52-
52+
5353
//开始热更新
5454
ApplicationManager.Instance.StartCoroutine(HotUpdateProgress());
5555
}
@@ -105,6 +105,7 @@ static bool CheckLocalVersion()
105105
}
106106
else
107107
{
108+
Debug.Log("没有使用Bundle 无需更新");
108109
UpdateDateCallBack(HotUpdateStatusEnum.NoUpdate, 0);
109110
return false;
110111
}
@@ -136,7 +137,7 @@ static IEnumerator CheckVersion()
136137
//取得服务器版本文件
137138
WWW www = new WWW(s_versionFileDownLoadPath);
138139

139-
//Debug.Log("服务器获取版本文件 :" + s_versionFileDownLoadPath);
140+
Debug.Log("服务器获取版本文件 :" + s_versionFileDownLoadPath);
140141
//yield return www;
141142

142143
while (!www.isDone)
@@ -148,7 +149,7 @@ static IEnumerator CheckVersion()
148149
if (www.error != null && www.error != "")
149150
{
150151
//下载失败
151-
//Debug.LogError("Version File DownLoad Error URL:" + s_versionFileDownLoadPath + " error:" + www.error);
152+
Debug.LogError("Version File DownLoad Error URL:" + s_versionFileDownLoadPath + " error:" + www.error);
152153

153154
UpdateDateCallBack(HotUpdateStatusEnum.VersionFileDownLoadFail, 0);
154155
yield break;
@@ -162,8 +163,8 @@ static IEnumerator CheckVersion()
162163

163164
//Debug.Log("Version File :text: " + m_versionFileCatch);
164165

165-
Debug.Log("Service Version File :text: " + s_versionFileCache);
166-
Debug.Log("local Version : " + GetInt(s_versionConfig[c_largeVersionKey]) + " " + GetInt(s_versionConfig[c_smallVersonKey]));
166+
//Debug.Log("Service Version File :text: " + s_versionFileCache);
167+
//Debug.Log("local Version : " + GetInt(s_versionConfig[c_largeVersionKey]) + " " + GetInt(s_versionConfig[c_smallVersonKey]));
167168

168169
Dictionary<string, object> ServiceVersion = (Dictionary<string, object>)FrameWork.Json.Deserialize(s_versionFileCache);
169170

@@ -353,11 +354,13 @@ static void Init()
353354
}
354355

355356
string downLoadPath = downLoadServicePath + "/" + platform + "/" + Application.version + "/";
356-
Debug.Log("=====>"+downLoadPath);
357+
357358

358359
s_versionFileDownLoadPath = downLoadPath + c_versionFileName.ToLower() ;
359360
s_ManifestFileDownLoadPath = downLoadPath + AssetsManifestManager.c_ManifestFileName;
360361
s_resourcesFileDownLoadPath = downLoadPath;
362+
363+
Debug.Log("=====>" + s_versionFileDownLoadPath);
361364
}
362365

363366
static void UpdateDateCallBack(HotUpdateStatusEnum status, float progress)

Assets/Script/Core/Language/LanguageManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public static void Init()
3333
{
3434
isInit = true;
3535

36-
Debug.Log("当前语言: " + Application.systemLanguage);
3736
config = LanguageDataUtils.LoadEditorConfig();
3837
SetLanguage(ApplicationManager.Langguage);
3938
}

Assets/Script/Core/Module.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.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
7+
public class KeyValueData
8+
{
9+
public string key="";
10+
public string value="";
11+
12+
public KeyValueData() { }
13+
14+
public KeyValueData(string key,string value)
15+
{
16+
this.key = key;
17+
this.value = value;
18+
}
19+
}
20+

0 commit comments

Comments
 (0)