Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c

dev_chengFeng
jiaoyangna 2021-06-01 11:45:19 +08:00
commit a60e73f5ef
2 changed files with 32 additions and 8 deletions

View File

@ -34,6 +34,7 @@ public class AutoPack : EditorWindow
static string ABPath; static string ABPath;
static string APKPath; static string APKPath;
static string PackTime; static string PackTime;
static bool CommitToGit;
// 判断是否要重新导出工程 // 判断是否要重新导出工程
static string[] ExportTypeList = static string[] ExportTypeList =
@ -132,6 +133,7 @@ public class AutoPack : EditorWindow
ExportType = EditorGUILayout.Popup("请选择出包方式", ExportType, ExportTypeList); ExportType = EditorGUILayout.Popup("请选择出包方式", ExportType, ExportTypeList);
EditorGUILayout.Space(); EditorGUILayout.Space();
CommitToGit = EditorGUILayout.ToggleLeft("是否要提交到Git", CommitToGit);
EditorGUILayout.Space(); EditorGUILayout.Space();
@ -380,11 +382,14 @@ public class AutoPack : EditorWindow
EditorUtility.ClearProgressBar(); EditorUtility.ClearProgressBar();
} }
private static void GitCommit(int index) private static void GitCommit(int index)
{
if (CommitToGit)
{ {
EditorUtility.DisplayProgressBar("正在提交修改", "", 0f); EditorUtility.DisplayProgressBar("正在提交修改", "", 0f);
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git add .>" + APKPath + "/_log.txt"); ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git add .>" + APKPath + "/_log.txt");
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git commit 'AutoPack"+ PackConfig[index][0]+" "+PackTime+"/"+ PackConfig[index][2] +".apk'"); ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git commit -m 'AutoPack" + PackConfig[index][0] + " " + PackTime + "/" + PackConfig[index][2] + ".apk'");
EditorUtility.ClearProgressBar(); EditorUtility.ClearProgressBar();
}
} }

View File

@ -28,6 +28,10 @@ local func=nil
this.time = Timer.New() this.time = Timer.New()
this.time2 = Timer.New() this.time2 = Timer.New()
this.time3 = Timer.New() this.time3 = Timer.New()
local Sound_Recruit2
local Sound_Recruit3
local Sound_Recruit4
--初始化组件(用于子类重写) --初始化组件(用于子类重写)
function SingleRecruitPanel:InitComponent() function SingleRecruitPanel:InitComponent()
this.spLoader = SpriteLoader.New() this.spLoader = SpriteLoader.New()
@ -150,6 +154,7 @@ function SingleRecruitPanel:BindEvent()
UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType) UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType)
end end
this.jumpBtnGo:SetActive(false) this.jumpBtnGo:SetActive(false)
this.StopPanelSound()
end) end)
--确定按钮 --确定按钮
Util.AddClick(self.goBtn,function() Util.AddClick(self.goBtn,function()
@ -200,7 +205,7 @@ end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function SingleRecruitPanel:OnOpen(...) function SingleRecruitPanel:OnOpen(...)
this.UI_Effect_open:SetActive(true) 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_choukaSSR:SetActive(false)
this.UI_Effect_choukaSR:SetActive(false) this.UI_Effect_choukaSR:SetActive(false)
this.UI_Effect_choukaR:SetActive(false) this.UI_Effect_choukaR:SetActive(false)
@ -290,7 +295,7 @@ function SingleRecruitPanel:TenOpenPanel()
this.UI_Effect_choukaSR:SetActive(false) this.UI_Effect_choukaSR:SetActive(false)
this.UI_Effect_choukaR:SetActive(false) this.UI_Effect_choukaR:SetActive(false)
this.UI_Effect_appear:SetActive(true) this.UI_Effect_appear:SetActive(true)
SoundManager.PlaySound(SoundConfig.Sound_Recruit2) Sound_Recruit2 = SoundManager.PlaySound(SoundConfig.Sound_Recruit2)
end, timeNum) end, timeNum)
this.time:Start() this.time:Start()
this.time3 = Timer.New(function () this.time3 = Timer.New(function ()
@ -326,7 +331,7 @@ function SingleRecruitPanel:UpdataPanelData(_heroData)
Game.GlobalEvent:DispatchEvent(GameEvent.UI.OnUpdateData, self.uiConfig.id) Game.GlobalEvent:DispatchEvent(GameEvent.UI.OnUpdateData, self.uiConfig.id)
this.jumpBtnGo:SetActive(false) this.jumpBtnGo:SetActive(false)
this.UI_Effect_appear: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 if heroStaticData and testLiveGO then
poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO) poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO)
@ -446,8 +451,22 @@ function SingleRecruitPanel:OnClose()
poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO) poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO)
end end
heroStaticData, testLiveGO = nil, nil 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 end
function SingleRecruitPanel:GetProStr(index) function SingleRecruitPanel:GetProStr(index)
local proStr="" local proStr=""
if index==1 then if index==1 then