挂机修改提交

tcx_xiyou_solider
PC-202302260912\Administrator 2024-04-24 15:52:30 +08:00
parent 74d0a40977
commit 0c6cb97ec5
7 changed files with 10402 additions and 6 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 526739a5774cb174da56f943a2e716b2
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -527,6 +527,7 @@ UIName = {
SmallSoldierUpFigthInfoPanel = 535,--上阵小兵信息界面
HelpFightPanel = 536, --助战界面
HelpFightListPanel = 537,--助战列表界面
SmallSoldierFailPop = 538, --小兵失败界面
}
SubUIConfig = {

View File

@ -519,7 +519,7 @@ function this.RefreshSoliderInfo()
end
--
this.soliderList[i].effect:SetActive(false)
Util.SetParticleSortLayer(this.soliderList[i].effect,orginLayer+1)
Util.SetParticleSortLayer(this.soliderList[i].effect,orginLayer)
this.soliderList[i].stateImg.gameObject:SetActive(false)
this.soliderList[i].lock:SetActive(CheckListIsContainValue1(openList,i)==false)
end
@ -573,7 +573,7 @@ function this.ShowBattleInfo()
this.bossLiveGOEffect.transform.localPosition = Vector3.New(0, 0, 0)
this.bossLiveGOEffect:SetActive(false)
end
Util.SetParticleSortLayer(this.bossLiveGOEffect, orginLayer+2)
Util.SetParticleSortLayer(this.bossLiveGOEffect, orginLayer+1)
local team=FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
for i=1,6 do
@ -797,6 +797,11 @@ function this.BattleLogic()
--this.hpBar.fillAmount=bossHp/curSoliderStageConfig.Hp
this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber)
this.battleTimer:Start()
if PlayerPrefs.GetInt("SmallSoldierFailed"..PlayerManager.uid)~=FightPointPassManager.soldierLayerId then
UIManager.OpenPanel(UIName.SmallSoldierFailPop)
PlayerPrefs.SetInt("SmallSoldierFailed"..PlayerManager.uid,FightPointPassManager.soldierLayerId)
end
end
if bossHp<=0 then
LogError("boss被击败")
@ -828,6 +833,8 @@ function this.BattleLogic()
end
--刷新挂机奖励
--this.IntiReward()
else
PopupTipPanel.ShowTip("服务器战斗验证失败")
end
this.battleTimer:Start()
cd=0
@ -1458,6 +1465,9 @@ function FightPointPassMainPanel:OnSortingOrderChange()
Util.SetParticleSortLayer(this.heroList[i].effect, self.sortingOrder+2)
end
end
for i=1, #soliderPreList do
Util.SetParticleSortLayer(soliderPreList[i].effect, orginLayer+2)
end
end
--界面关闭时调用(用于子类重写)

View File

@ -0,0 +1,89 @@
require("Base/BasePanel")
SmallSoldierFailPop = Inherit(BasePanel)
local this = SmallSoldierFailPop
local m_battlePanel
local m_showRecord = true
local m_backPanel
local orginLayer
local fightType
local isBackBattle = false
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
--初始化组件(用于子类重写)
function SmallSoldierFailPop:InitComponent()
this.spLoader = SpriteLoader.New()
orginLayer = 0
this.btnClose = Util.GetGameObject(self.gameObject, "Lose")
this.failImg = Util.GetGameObject(self.gameObject, "Lose/image/ziti"):GetComponent("Image")
this.failImg.sprite = this.spLoader:LoadSprite("UI_effect_JJC_JieSuan_ShiBai_png_zh")
this.btnGrowUp = Util.GetGameObject(this.btnClose, "btnGrowUp")
end
--绑定事件(用于子类重写)
function SmallSoldierFailPop:BindEvent()
Util.AddClick(this.btnClose, function ()
self:ClosePanel()
end)
Util.AddClick(this.btnGrowUp, function ()
-- 跳转到我要变强
JumpManager.GoJump(48001)
end)
end
--添加事件监听(用于子类重写)
function SmallSoldierFailPop:AddListener()
end
--移除事件监听(用于子类重写)
function SmallSoldierFailPop:RemoveListener()
end
function SmallSoldierFailPop:OnSortingOrderChange()
Util.AddParticleSortLayer(this.btnClose, self.sortingOrder - orginLayer)
orginLayer = self.sortingOrder
end
--界面打开时调用(用于子类重写)
function SmallSoldierFailPop:OnOpen(battlePanel, showRecord, backPanel,_fightType)
this.openTime = GetTimeStamp()
if _fightType then
fightType = _fightType
end
this.btnGrowUp:SetActive(false)
end
function this:LoseJump(id)
if not MapManager.Mapping then
if JumpManager.CheckJump(id) then
if m_battlePanel then
m_battlePanel:ClosePanel()
end
self:ClosePanel()
JumpManager.GoJumpWithoutTip(id)
end
else
PopupTipPanel.ShowTip(Language[10210])
end
end
--界面关闭时调用(用于子类重写)
function SmallSoldierFailPop:OnClose()
Game.GlobalEvent:DispatchEvent(GameEvent.Map.MaskState,0)
end
--界面销毁时调用(用于子类重写)
function SmallSoldierFailPop:OnDestroy()
this.spLoader:Destroy()
end
return SmallSoldierFailPop

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 74816843b59990647b2e0e5f4d196b87
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -94,13 +94,13 @@ function SettingInfo:SetReslutionTipShow()
local value = PlayerPrefs.GetInt("ResLution")
this.selectResolution.value = value
if value == 0 then
UnityEngine.Application.targetFrameRate = 30;
this.selectResolutionText.text = "普通帧率"
this.selectResolutionTip.gameObject:SetActive(false)
else
UnityEngine.Application.targetFrameRate = 60;
this.selectResolutionText.text = "高帧率"
this.selectResolutionTip.gameObject:SetActive(true)
else
UnityEngine.Application.targetFrameRate = 30;
this.selectResolutionText.text = "普通帧率"
this.selectResolutionTip.gameObject:SetActive(false)
end
end
end