Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c
commit
3ef54596d3
|
@ -3,6 +3,7 @@ using UnityEditor;
|
|||
using System.IO;
|
||||
using System;
|
||||
using GameEditor.FrameTool;
|
||||
using GameEditor.Util;
|
||||
|
||||
public class AutoPack : EditorWindow
|
||||
{
|
||||
|
@ -31,6 +32,9 @@ public class AutoPack : EditorWindow
|
|||
static string ExportPackPath;
|
||||
static string ScenePath;
|
||||
static string ABPath;
|
||||
static string APKPath;
|
||||
static string PackTime;
|
||||
static bool CommitToGit;
|
||||
|
||||
// 判断是否要重新导出工程
|
||||
static string[] ExportTypeList =
|
||||
|
@ -129,6 +133,7 @@ public class AutoPack : EditorWindow
|
|||
|
||||
ExportType = EditorGUILayout.Popup("请选择出包方式", ExportType, ExportTypeList);
|
||||
EditorGUILayout.Space();
|
||||
CommitToGit = EditorGUILayout.ToggleLeft("是否要提交到Git", CommitToGit);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
|
||||
|
@ -178,22 +183,46 @@ public class AutoPack : EditorWindow
|
|||
ExportAS(i);
|
||||
ReplaceFromProject(i);
|
||||
ReplaceConfigAndVersion(i);
|
||||
GitUpdate(i);
|
||||
CreateLogFile(i);
|
||||
StartGradleBuild(i);
|
||||
GitCommit(i);
|
||||
break;
|
||||
case 1: // 只替换AB
|
||||
ReplaceFromAB(i);
|
||||
ReplaceConfigAndVersion(i);
|
||||
GitUpdate(i);
|
||||
CreateLogFile(i);
|
||||
StartGradleBuild(i);
|
||||
GitCommit(i);
|
||||
break;
|
||||
case 2: // 只重新打包
|
||||
ReplaceConfigAndVersion(i);
|
||||
GitUpdate(i);
|
||||
CreateLogFile(i);
|
||||
StartGradleBuild(i);
|
||||
GitCommit(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void CreateLogFile(int index)
|
||||
{
|
||||
APKPath = _MomPackPath + PackConfig[index][2] + "/APK/";
|
||||
if (!Directory.Exists(APKPath))
|
||||
{
|
||||
Directory.CreateDirectory(APKPath);
|
||||
}
|
||||
PackTime = DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss");
|
||||
APKPath += PackTime;
|
||||
if (!Directory.Exists(APKPath))
|
||||
{
|
||||
Directory.CreateDirectory(APKPath);
|
||||
}
|
||||
|
||||
}
|
||||
// 导出android 工程
|
||||
public static void ExportAS(int index)
|
||||
{
|
||||
|
@ -248,13 +277,20 @@ public class AutoPack : EditorWindow
|
|||
string to = toPath + dir;
|
||||
if (Directory.Exists(to)) Directory.Delete(to, true);
|
||||
Directory.CreateDirectory(to);
|
||||
GameCore.FileUtils.CopyDir(fromPath + dir, to);
|
||||
GameCore.FileUtils.CopyDir(fromPath + dir, to, (string dirName, string fileName, float progress)=>
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("正在复制:"+ dirName, fileName, progress);
|
||||
});
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
Debug.Log(PackConfig[index][0] + ":母包工程资源替换完成");
|
||||
|
||||
// 替换build-id
|
||||
|
||||
EditorUtility.DisplayProgressBar("重写AndroidManifest", "", 0.5f);
|
||||
RewriteManifest(fromPath + "/src/main/AndroidManifest.xml", toPath + "/src/main/AndroidManifest.xml");
|
||||
Debug.Log(PackConfig[index][0] + ":母包Manifest修改完成");
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
private static void RewriteManifest(string f, string t)
|
||||
{
|
||||
|
@ -303,25 +339,58 @@ public class AutoPack : EditorWindow
|
|||
string toPath = _MomPackPath + PackConfig[index][2] + "/src/main/assets/Android";
|
||||
if (Directory.Exists(toPath)) Directory.Delete(toPath, true);
|
||||
Directory.CreateDirectory(toPath);
|
||||
GameCore.FileUtils.CopyDir(ABPath, toPath);
|
||||
GameCore.FileUtils.CopyDir(ABPath, toPath, (string dirName, string fileName, float progress) =>
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("正在复制:" + dirName, fileName, progress);
|
||||
});
|
||||
EditorUtility.ClearProgressBar();
|
||||
Debug.Log(PackConfig[index][0] + ":替换AB包完成");
|
||||
}
|
||||
|
||||
// 替换配置文件
|
||||
private static void ReplaceConfigAndVersion(int index)
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("替换配置文件", "", 0.5f);
|
||||
string toPath = _MomPackPath + PackConfig[index][2] + "/src/main/assets/Android/";
|
||||
string fromPath = _MomPackPath + PackConfig[index][2] + "/Config/";
|
||||
File.Copy(fromPath + ConfigFileName, toPath + ConfigFileName, true);
|
||||
File.Copy(fromPath + VersionFileName, toPath + VersionFileName, true);
|
||||
Debug.Log(PackConfig[index][0]+":配置文件替换完成");
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
|
||||
// 开始生成apk
|
||||
private static void StartGradleBuild(int index)
|
||||
{
|
||||
GameEditor.Util.ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "gradlew assembleDebug");
|
||||
EditorUtility.DisplayProgressBar("正在生成APK", "", 0f);
|
||||
GameEditor.Util.ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "gradlew assembleRelease>" + APKPath + "/_log.txt");
|
||||
|
||||
EditorUtility.DisplayProgressBar("正在导出APK", "", 1f);
|
||||
string apkFilePath = _MomPackPath + PackConfig[index][2] + "/build/outputs/apk/release/" + PackConfig[index][2] + "-release.apk";
|
||||
if (File.Exists(apkFilePath))
|
||||
{
|
||||
File.Copy(apkFilePath, APKPath + "/" + PackConfig[index][2] + ".apk");
|
||||
}
|
||||
Debug.Log(PackConfig[index][0] + ":打包完成");
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
|
||||
private static void GitUpdate(int index)
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("正在更新母包", "", 0f);
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git pull>" + APKPath + "/_log.txt");
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
private static void GitCommit(int index)
|
||||
{
|
||||
if (CommitToGit)
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("正在提交修改", "", 0f);
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git add .>" + APKPath + "/_log.txt");
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git commit -m 'AutoPack:" + PackConfig[index][0] + " " + PackTime + "/" + PackConfig[index][2] + ".apk'");
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//private static void ExportXcode(string _sceneName)
|
||||
|
|
|
@ -25,7 +25,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2754606}
|
||||
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
|
@ -34,7 +34,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 46.44001, y: 0}
|
||||
m_AnchoredPosition: {x: 46.44001, y: 29.799927}
|
||||
m_SizeDelta: {x: 95, y: 95}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1340578678646069342
|
||||
|
@ -184,7 +184,7 @@ RectTransform:
|
|||
- {fileID: 4794193363044016226}
|
||||
- {fileID: 7979493423713549204}
|
||||
m_Father: {fileID: 1012972711}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
|
@ -5050,7 +5050,7 @@ ParticleSystem:
|
|||
--- !u!199 &689865173
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -5516,8 +5516,8 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 698392784}
|
||||
- {fileID: 5391497229806396012}
|
||||
- {fileID: 107230295}
|
||||
- {fileID: 2110103215}
|
||||
- {fileID: 107230295}
|
||||
m_Father: {fileID: 6498494602927743175}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -6389,12 +6389,12 @@ RectTransform:
|
|||
- {fileID: 6190705344566736628}
|
||||
- {fileID: 7044132877104389030}
|
||||
m_Father: {fileID: 1012972711}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 112, y: 112}
|
||||
m_SizeDelta: {x: 112, y: 148.1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2110103218
|
||||
CanvasRenderer:
|
||||
|
@ -11335,7 +11335,7 @@ ParticleSystem:
|
|||
--- !u!199 &53865032735354669
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -16186,7 +16186,7 @@ ParticleSystem:
|
|||
--- !u!199 &53865032903479894
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -20921,7 +20921,7 @@ ParticleSystem:
|
|||
--- !u!199 &53865033217178009
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -25534,7 +25534,7 @@ ParticleSystem:
|
|||
--- !u!199 &53865033315684810
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -26483,7 +26483,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 391041880342581856}
|
||||
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
|
@ -26492,7 +26492,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 79.74001, y: 33.1}
|
||||
m_AnchoredPosition: {x: 79.74001, y: 62.900047}
|
||||
m_SizeDelta: {x: 30, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7450004280634771642
|
||||
|
@ -31185,7 +31185,7 @@ ParticleSystem:
|
|||
--- !u!199 &4590674014730051834
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -31625,7 +31625,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 50, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 217.5}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1473222624206509369
|
||||
|
@ -36527,7 +36527,7 @@ ParticleSystem:
|
|||
--- !u!199 &345244862577150605
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -41439,7 +41439,7 @@ ParticleSystem:
|
|||
--- !u!199 &1269342248769744005
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -46308,7 +46308,7 @@ ParticleSystem:
|
|||
--- !u!199 &1269342248929065148
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -51705,7 +51705,7 @@ ParticleSystem:
|
|||
--- !u!199 &3340559361339608959
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -52728,7 +52728,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 46.44001, y: 0}
|
||||
m_AnchoredPosition: {x: 46.44001, y: 29.799927}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &2163478246162048306
|
||||
|
@ -57868,7 +57868,7 @@ ParticleSystem:
|
|||
--- !u!199 &4461638917069206421
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -60093,7 +60093,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3747070971011954181}
|
||||
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
|
@ -60102,7 +60102,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 47, y: -0.3}
|
||||
m_AnchoredPosition: {x: 47, y: 29.499928}
|
||||
m_SizeDelta: {x: 109.23, y: 109.04}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3747070971011954178
|
||||
|
@ -65029,7 +65029,7 @@ ParticleSystem:
|
|||
--- !u!199 &8153914426121884216
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -70206,7 +70206,7 @@ ParticleSystem:
|
|||
--- !u!199 &4571234231691897658
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -70735,7 +70735,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4469323207721599499}
|
||||
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
|
@ -70744,7 +70744,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 46.44001, y: 0}
|
||||
m_AnchoredPosition: {x: 46.44001, y: 29.799927}
|
||||
m_SizeDelta: {x: 95, y: 95}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8840073511339574820
|
||||
|
@ -71138,7 +71138,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4744240912008588426}
|
||||
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
|
@ -71147,7 +71147,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 46.44001, y: -69.1}
|
||||
m_AnchoredPosition: {x: 46.44001, y: -39.29995}
|
||||
m_SizeDelta: {x: 126.6, y: 31.45}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8614474801755879562
|
||||
|
@ -71286,7 +71286,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4820421069940768290}
|
||||
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
|
@ -71295,7 +71295,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 46.44001, y: -69.2}
|
||||
m_AnchoredPosition: {x: 46.44001, y: -39.39995}
|
||||
m_SizeDelta: {x: 160, y: 60}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4820421069940768301
|
||||
|
@ -76619,7 +76619,7 @@ ParticleSystem:
|
|||
--- !u!199 &6988990775388982249
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -82665,7 +82665,7 @@ ParticleSystem:
|
|||
--- !u!199 &1454073279585546898
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -87562,7 +87562,7 @@ ParticleSystem:
|
|||
--- !u!199 &6133679773105218358
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -92456,7 +92456,7 @@ ParticleSystem:
|
|||
--- !u!199 &6133679773792227019
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -97122,7 +97122,7 @@ ParticleSystem:
|
|||
--- !u!199 &6133679774607836274
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -97478,7 +97478,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 50, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &109213283015355470
|
||||
|
@ -98152,7 +98152,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6556360217626877981}
|
||||
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
|
@ -98161,7 +98161,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 12.540012, y: -35.8}
|
||||
m_AnchoredPosition: {x: 12.540012, y: -6.0000725}
|
||||
m_SizeDelta: {x: 160, y: 60}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3138096716679861701
|
||||
|
@ -104480,7 +104480,7 @@ ParticleSystem:
|
|||
--- !u!199 &4325216380872068964
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -110039,7 +110039,7 @@ ParticleSystem:
|
|||
--- !u!199 &5429492888628637653
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -114816,7 +114816,7 @@ ParticleSystem:
|
|||
--- !u!199 &8548423836369118796
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -119699,7 +119699,7 @@ ParticleSystem:
|
|||
--- !u!199 &8548423836683259267
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -124534,7 +124534,7 @@ ParticleSystem:
|
|||
--- !u!199 &8548423837075803679
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -129254,7 +129254,7 @@ ParticleSystem:
|
|||
--- !u!199 &8548423837924684024
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
|
|
@ -227,7 +227,7 @@ function this.ShowCountTime()
|
|||
this.timer1 = Timer.New(function ()
|
||||
freshData = freshData - 1
|
||||
if freshData < 0 then
|
||||
ChecRedPointEndLess(RedPointType.EndlessPanel)
|
||||
CheckRedPointStatus(RedPointType.EndlessPanel)
|
||||
this:ClosePanel()
|
||||
else
|
||||
updateTime()
|
||||
|
|
|
@ -69,7 +69,7 @@ function ActivityMainPanel:CheckActOpen(_index)
|
|||
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[_index].ActiveType)
|
||||
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[_index].ActiveType) then
|
||||
if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then
|
||||
if tabs[_index].ActiveType == ActivityTypeDef.DynamicAct then
|
||||
if tabs[_index].ActiveType == ActivityTypeDef.DynamicAct or tabs[_index].ActiveType == ActivityTypeDef.LimitUpHero then
|
||||
_CurPageIndex = _index
|
||||
elseif GlobalActConfig[id].ShowArt == this.activityType then
|
||||
_CurPageIndex = _index
|
||||
|
|
|
@ -126,6 +126,7 @@ function QianKunBoxBuyTenPanel:OnSortingOrderChange()
|
|||
end
|
||||
--界面打开时调用(用于子类重写)
|
||||
function QianKunBoxBuyTenPanel:OnOpen(...)
|
||||
SoundManager.PlaySound(SoundConfig.UI_Siyuanzhen)
|
||||
-- this.itemIcon1.sprite=this.spLoader:LoadSprite(GetResourcePath(ItemConfig[SecretBoxManager.MainCost[2][1][1]].ResourceID))
|
||||
local args = { ... }
|
||||
this.drop=args[1]
|
||||
|
|
|
@ -132,9 +132,13 @@ function TimeLimitUpHero:OnShow(_sortingOrder)
|
|||
local id = ActivityGiftManager.IsActivityTypeOpen(self.actConfig.ActiveType)
|
||||
if id and id > 0 then
|
||||
self.actId = id
|
||||
local config = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"PageType",self.actConfig.PageType,"ActiveType",self.actConfig.ActiveType,"ActId",id)
|
||||
if config then
|
||||
self.actConfig = config
|
||||
|
||||
local actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",globalActive[id].ShowArt,"PageType",self.actConfig.PageType,"ActiveType",self.actConfig.ActiveType)
|
||||
if not actConfig then
|
||||
actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",id,"PageType",self.actConfig.PageType,"ActiveType",self.actConfig.ActiveType)
|
||||
end
|
||||
if actConfig then
|
||||
self.actConfig = actConfig
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -271,7 +271,7 @@ function this:SetActiveGameObj()
|
|||
this.heroGrid.gameObject:SetActive(true)
|
||||
this.enemyInfo.gameObject:SetActive(false)
|
||||
this.propList.gameObject:SetActive(false)
|
||||
this.fireRoot.gameObject:SetActive(false)
|
||||
this.fireRoot.gameObject:SetActive(isShow)
|
||||
this.EndLessEffect.gameObject:SetActive(false)
|
||||
this.endLessTitle.gameObject:SetActive(not isShow)
|
||||
this.stepROot.gameObject:SetActive(not isShow)
|
||||
|
|
|
@ -28,6 +28,10 @@ local func=nil
|
|||
this.time = Timer.New()
|
||||
this.time2 = Timer.New()
|
||||
this.time3 = Timer.New()
|
||||
local Sound_Recruit2
|
||||
local Sound_Recruit3
|
||||
local Sound_Recruit4
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function SingleRecruitPanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
|
@ -150,6 +154,7 @@ function SingleRecruitPanel:BindEvent()
|
|||
UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType)
|
||||
end
|
||||
this.jumpBtnGo:SetActive(false)
|
||||
this.StopPanelSound()
|
||||
end)
|
||||
--确定按钮
|
||||
Util.AddClick(self.goBtn,function()
|
||||
|
@ -200,7 +205,7 @@ end
|
|||
--界面打开时调用(用于子类重写)
|
||||
function SingleRecruitPanel:OnOpen(...)
|
||||
this.UI_Effect_open:SetActive(true)
|
||||
SoundManager.PlaySound(SoundConfig.Sound_Recruit4)
|
||||
Sound_Recruit4 = SoundManager.PlaySound(SoundConfig.Sound_Recruit4)
|
||||
this.UI_Effect_choukaSSR:SetActive(false)
|
||||
this.UI_Effect_choukaSR:SetActive(false)
|
||||
this.UI_Effect_choukaR:SetActive(false)
|
||||
|
@ -290,7 +295,7 @@ function SingleRecruitPanel:TenOpenPanel()
|
|||
this.UI_Effect_choukaSR:SetActive(false)
|
||||
this.UI_Effect_choukaR:SetActive(false)
|
||||
this.UI_Effect_appear:SetActive(true)
|
||||
SoundManager.PlaySound(SoundConfig.Sound_Recruit2)
|
||||
Sound_Recruit2 = SoundManager.PlaySound(SoundConfig.Sound_Recruit2)
|
||||
end, timeNum)
|
||||
this.time:Start()
|
||||
this.time3 = Timer.New(function ()
|
||||
|
@ -326,7 +331,7 @@ function SingleRecruitPanel:UpdataPanelData(_heroData)
|
|||
Game.GlobalEvent:DispatchEvent(GameEvent.UI.OnUpdateData, self.uiConfig.id)
|
||||
this.jumpBtnGo:SetActive(false)
|
||||
this.UI_Effect_appear:SetActive(false)
|
||||
SoundManager.PlaySound(SoundConfig.Sound_Recruit3)
|
||||
Sound_Recruit3 = SoundManager.PlaySound(SoundConfig.Sound_Recruit3)
|
||||
|
||||
if heroStaticData and testLiveGO then
|
||||
poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO)
|
||||
|
@ -446,8 +451,22 @@ function SingleRecruitPanel:OnClose()
|
|||
poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO)
|
||||
end
|
||||
heroStaticData, testLiveGO = nil, nil
|
||||
this.StopPanelSound()
|
||||
end
|
||||
function this.StopPanelSound()
|
||||
if Sound_Recruit2 then
|
||||
SoundManager.StopSound(Sound_Recruit2)
|
||||
Sound_Recruit2 = nil
|
||||
end
|
||||
if Sound_Recruit3 then
|
||||
SoundManager.StopSound(Sound_Recruit3)
|
||||
Sound_Recruit3 = nil
|
||||
end
|
||||
if Sound_Recruit4 then
|
||||
SoundManager.StopSound(Sound_Recruit4)
|
||||
Sound_Recruit4 = nil
|
||||
end
|
||||
end
|
||||
|
||||
function SingleRecruitPanel:GetProStr(index)
|
||||
local proStr=""
|
||||
if index==1 then
|
||||
|
|
|
@ -116,6 +116,7 @@ function SecretBoxBuyTenPanel:OnSortingOrderChange()
|
|||
end
|
||||
--界面打开时调用(用于子类重写)
|
||||
function SecretBoxBuyTenPanel:OnOpen(...)
|
||||
SoundManager.PlaySound(SoundConfig.UI_Siyuanzhen)
|
||||
-- this.itemIcon1.sprite=this.spLoader:LoadSprite(GetResourcePath(ItemConfig[SecretBoxManager.MainCost[2][1][1]].ResourceID))
|
||||
local args = { ... }
|
||||
this.drop=args[1]
|
||||
|
|
|
@ -215,9 +215,9 @@ function this.TimeCountDown()
|
|||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
end
|
||||
local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.TreasureStore)
|
||||
local timeDown = endTime - GetTimeStamp()
|
||||
--local timeDown = CalculateSecondsNowTo_N_OClock(24)
|
||||
-- local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.TreasureStore)
|
||||
-- local timeDown = endTime - GetTimeStamp()
|
||||
local timeDown = CalculateSecondsNowTo_N_OClock(24)
|
||||
this.time.text = Language[10023]..TimeToHMS(timeDown)
|
||||
this.timer = Timer.New(function()
|
||||
timeDown = timeDown - 1
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace GameCore {
|
|||
/// </summary>
|
||||
/// <param name="fromDir"></param>
|
||||
/// <param name="toDir"></param>
|
||||
public static void CopyDir(string fromDir, string toDir)
|
||||
public static void CopyDir(string fromDir, string toDir, Action<string, string, float> callBack = null)
|
||||
{
|
||||
if (!Directory.Exists(fromDir))
|
||||
return;
|
||||
|
@ -90,18 +90,20 @@ namespace GameCore {
|
|||
}
|
||||
Directory.CreateDirectory(toDir);
|
||||
string[] files = Directory.GetFiles(fromDir);
|
||||
int i = 0;
|
||||
foreach (string formFileName in files)
|
||||
{
|
||||
string fileName = Path.GetFileName(formFileName);
|
||||
string toFileName = Path.Combine(toDir, fileName);
|
||||
File.Copy(formFileName, toFileName);
|
||||
if (callBack != null) callBack(fromDir, fileName, (float)++i/files.Length);
|
||||
}
|
||||
string[] fromDirs = Directory.GetDirectories(fromDir);
|
||||
foreach (string fromDirName in fromDirs)
|
||||
{
|
||||
string dirName = Path.GetFileName(fromDirName);
|
||||
string toDirName = Path.Combine(toDir, dirName);
|
||||
CopyDir(fromDirName, toDirName);
|
||||
CopyDir(fromDirName, toDirName, callBack);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ namespace GameLogic
|
|||
[SerializeField]
|
||||
UpdateMsgBox msgBox;
|
||||
|
||||
AssetBundle bundle;
|
||||
void Awake()
|
||||
{
|
||||
msgBox.gameObject.SetActive(false);
|
||||
|
@ -41,7 +42,29 @@ namespace GameLogic
|
|||
string updatePanelBg = ConfigManager.Instance.GetConfigInfo("Setting.UPDATE_PANEL_BG.value");
|
||||
if (updatePanelBg != null)
|
||||
{
|
||||
this.transform.Find("Canvas/LoadingScreen/bg1").GetComponent<Image>().sprite = App.ResMgr.LoadSpriteAsset(updatePanelBg);
|
||||
if (AppConst.bundleMode)
|
||||
{
|
||||
string path = AppConst.PersistentDataPath + "lz4/bg/loading/" + updatePanelBg + ".unity3d";
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
path = AppConst.StreamPath + "lz4/bg/loading/" + updatePanelBg + ".unity3d";
|
||||
}
|
||||
bundle = AssetBundle.LoadFromFile(path, 0, GameLogic.AppConst.EncyptBytesLength);
|
||||
if (bundle == null)
|
||||
{
|
||||
XDebug.Log.error(string.Format("{0} 不存在,请检查", path));
|
||||
return;
|
||||
}
|
||||
this.transform.Find("Canvas/LoadingScreen/bg1").GetComponent<Image>().sprite = bundle.LoadAsset<Sprite>(updatePanelBg);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
string path = AppConst.GameResPath + "/BG/Loading/" + updatePanelBg + ".jpg";
|
||||
Sprite sp = UnityEditor.AssetDatabase.LoadAssetAtPath<Sprite>(path);
|
||||
this.transform.Find("Canvas/LoadingScreen/bg1").GetComponent<Image>().sprite = sp;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
private void OnDestroy()
|
||||
|
@ -49,7 +72,8 @@ namespace GameLogic
|
|||
string updatePanelBg = ConfigManager.Instance.GetConfigInfo("Setting.UPDATE_PANEL_BG.value");
|
||||
if (updatePanelBg != null)
|
||||
{
|
||||
App.ResMgr.UnLoadAsset(updatePanelBg);
|
||||
if (bundle != null) bundle.Unload(true);
|
||||
bundle = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue