Merge branch 'xma/dev-b' of http://60.1.1.230/gaoxin/JL_Client into xma/dev-b

dev_chengFeng
ZhangBiao 2021-04-09 16:53:04 +08:00
commit 3827aa3a15
14 changed files with 1652 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 859 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: a188db60ee26e9c42b27d1855447f436
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 038a649ac5190e443b4fd3f1a0697baf
vertices: []
indices:
edges: []
weights: []
spritePackingTag: DyAct_Activity7
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7626,7 +7626,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3679961288471251120}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
@ -8052,7 +8052,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &9207170478563030241
RectTransform:
m_ObjectHideFlags: 0
@ -14718,7 +14718,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: 137, y: 595}
m_AnchoredPosition: {x: 288, y: 591.3}
m_SizeDelta: {x: 68, y: 68}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7408550933237222795

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -374,7 +374,9 @@ UIName = {
FuXingGaoZhaoPanel = 383,--福星高照
TianShuMiJuan = 381,--天枢密卷弹窗
ActivityMainPanel = 384, --活动新界面
FifteenDayGiftPanel = 385,--十五日登录
FifteenDayGiftPanel = 385,--十五日登录
RedpotDebugPanel = 386, -- 红点debug
}
SubUIConfig = {

View File

@ -354,7 +354,7 @@ local activityType = {
bg = "Bg2",
hero = {
[1]={name="Bg2/hero1",id=10092,hero="s_shibukedang_shenjiang11"}, ----精卫
[2]={name="Bg2/hero2",id=10033,hero="b_bianhuanmoce_shenjiang2"}, ---哪吒
[2]={name="Bg2/hero2",id=10033,hero="timelimit_putishushen2"}, ---哪吒
[3]={name="Bg2/hero3",id=10090,hero="x_xianglongfuhu_shenjiang22"}, --吕洞宾
},
title = "s_suoxiangpimi_zi_zh",

View File

@ -91,6 +91,7 @@ function GMPanel:InitComponent()
{type = GMType.Function, subType = GMSubType.Server, inputNum = 1, args = "23#0#%s", btnTip = Language[11176], inputTip = {Language[11196]}, callBack = nil},
{type = GMType.Function, subType = GMSubType.Server, inputNum = 1, args = "24#%s", btnTip = Language[11197], inputTip = {Language[11198]}, callBack = nil},
{type = GMType.Function, subType = GMSubType.Func, inputNum = 1, args = "", btnTip = Language[12175], inputTip = {Language[12176]}, callBack = this.TestFuncGuide},
{type = GMType.Function, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "红点Debug", inputTip = {""}, callBack = this.OpenRedDebug},
{type = GMType.Battle, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = Language[11199], inputTip = {""}, callBack = this.GoTestBattle},
@ -322,6 +323,10 @@ function this.TestFuncGuide(text)
local gid = tonumber(text)
GuideManager.AddFuncGuide(gid)
end
-- 红点Debug
function this.OpenRedDebug()
UIManager.OpenPanel(UIName.RedpotDebugPanel)
end
-- 添加圣物
function this.AddHoly(text)
local command = "//addholy %s %s"

View File

@ -0,0 +1,180 @@
require("Base/BasePanel")
local RedpotDebugPanel = Inherit(BasePanel)
local RPData = require("Modules/Player/RedPointData")
--初始化组件(用于子类重写)
function RedpotDebugPanel:InitComponent()
self.btnClose = Util.GetGameObject(self.gameObject, "btnClose")
self.btnBack = Util.GetGameObject(self.gameObject, "btnBack")
self.p_red = Util.GetGameObject(self.gameObject, "p_red")
self.p_id = Util.GetGameObject(self.gameObject, "p_id"):GetComponent("Text")
self.cRoot = Util.GetGameObject(self.gameObject, "rect")
self.cNode = Util.GetGameObject(self.gameObject, "node")
local rootHight = self.cRoot.transform.rect.height
local width = self.cRoot.transform.rect.width
if not self.ScrollView then
self.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.cRoot.transform,
self.cNode, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0, 35))
self.scrollView.moveTween.MomentumAmount = 1
self.scrollView.moveTween.Strength = 2
end
self.result = Util.GetGameObject(self.gameObject, "result"):GetComponent("Text")
end
--绑定事件(用于子类重写)
function RedpotDebugPanel:BindEvent()
Util.AddOnceClick(self.btnClose, function()
self:ClosePanel()
end)
Util.AddOnceClick(self.btnBack, function()
if not self.CurPRed then
return
end
self.CurPRed = RPData:GetRedParent(self.CurPRed)
self:RefreshShow()
end)
end
--添加事件监听(用于子类重写)
function RedpotDebugPanel:AddListener()
end
--移除事件监听(用于子类重写)
function RedpotDebugPanel:RemoveListener()
end
function RedpotDebugPanel:OnSortingOrderChange()
end
--界面打开时调用(用于子类重写)
function RedpotDebugPanel:OnOpen(...)
self.CurPRed = nil
self:RefreshShow()
end
-- 打开,重新打开时回调
function RedpotDebugPanel:OnShow()
end
function RedpotDebugPanel:RefreshShow()
local list = self:GetCurRedList()
self.scrollView:SetData(list, function(index, node)
self:RedNodeAdapter(node, list[index])
end)
if self.CurPRed then
self.p_id.gameObject:SetActive(true)
self.p_red.gameObject:SetActive(true)
self.btnBack.gameObject:SetActive(true)
self.p_id.text = self.CurPRed
Util.SetGray(self.p_red, RPData:GetRedValue(self.CurPRed) <= 0)
else
self.p_id.gameObject:SetActive(false)
self.p_red.gameObject:SetActive(false)
self.btnBack.gameObject:SetActive(false)
end
end
-- 获取当前要显示的红点的list
function RedpotDebugPanel:GetCurRedList()
local list = {}
if self.CurPRed then
list = RPData:GetRedChildren(self.CurPRed)
else
local _data = RPData:GetAllRedData()
for node, value in pairs(_data) do
if not RPData:GetRedParent(node) then
table.insert(list, node)
end
end
table.sort(list, function(a, b)
return a < b
end)
end
return list
end
--
function RedpotDebugPanel:RedNodeAdapter(node, rp)
local red = Util.GetGameObject(node, "red")
local id = Util.GetGameObject(node, "id"):GetComponent("Text")
local btnChild = Util.GetGameObject(node, "child")
local btnCheck = Util.GetGameObject(node, "check")
id.text = rp
Util.SetGray(red, RPData:GetRedValue(rp) <= 0)
Util.AddOnceClick(btnChild, function()
local list = RPData:GetRedChildren(rp)
if #list <= 0 then
self.result.text = "no child red"
return
end
-- 设置红点显示
self.CurPRed = rp
self:RefreshShow()
end)
Util.AddOnceClick(btnCheck, function()
local list = RPData:GetRedChildren(rp)
if #list > 0 then
self.result.text = "parent, no check!"
return
end
local _checkFunc = RPData:GetCheckList()
local tip = ""
local value = nil
-- 判断是否解锁
if _checkFunc[rp] and _checkFunc[rp].openType then
local isOpen = ActTimeCtrlManager.SingleFuncState(_checkFunc[rp].openType)
if not isOpen then
value = 0
end
tip = tip .."funcType = ".._checkFunc[rp].openType.. ", isOpen = "..tostring(isOpen)
else
tip = tip .."no funcType"
end
tip = tip .." "
if not value then
-- 判断是否是服务器红点
if RPData:GetServerRed(rp) then
value = RPData:GetServerRed(rp)
tip = tip .."server red, value = "..tostring(value).."\t"
-- 判断是否注册了检测方法
elseif _checkFunc[rp] and _checkFunc[rp].func then
value = _checkFunc[rp].func(rp) and 1 or 0
tip = tip .."normal red, value = "..tostring(value).."\t"
end
end
tip = tip .." "
-- 数据正确性检测
if not value then
tip = tip .."error red type = node"
end
self.result.text = tip
end)
end
--界面关闭时调用(用于子类重写)
function RedpotDebugPanel:OnClose()
end
--界面销毁时调用(用于子类重写)
function RedpotDebugPanel:OnDestroy()
end
return RedpotDebugPanel

View File

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

View File

@ -54,12 +54,12 @@ local RedPointData = {}
function RedPointData:SetParent(child, parent)
-- 不能相反
if _parentIndex[parent] == child then
Log("试图将一个红点的父红点注册为其子红点, parent == ".. parent.. ", child == ".. child)
LogError("试图将一个红点的父红点注册为其子红点, parent == ".. parent.. ", child == ".. child)
return
end
-- 一个子节点只能有一个父节点
if _parentIndex[child] then
Log("红点id == " .. child.. ",重复设置了父级,请检查")
LogError("红点id == " .. child.. ",重复设置了父级,请检查")
return
end
-- 设置子节点对应的父节点
@ -78,6 +78,19 @@ end
function RedPointData:GetRedParent(node)
return _parentIndex[node]
end
function RedPointData:GetRedChildren(node)
local list = {}
for c, p in pairs(_parentIndex) do
if p == node then
table.insert(list, c)
end
end
-- 排序
table.sort(list, function(a, b)
return _childIndex[a] < _childIndex[b]
end)
return list
end
-- 对叶子节点设置红点状态
@ -96,6 +109,11 @@ function RedPointData:GetRedValue(node)
return _data[node]
end
-- 获取所有红点数据
function RedPointData:GetAllRedData()
return _data
end
-- 注册红点检测方法
function RedPointData:AddCheckFunc(node, func, openType)
if _childNum[node] and _childNum[node] > 0 then

View File

@ -158,8 +158,8 @@ function this.InitRedPointAllRelate()
RPData:SetParent(RedPointType.DailyTask, RedPointType.DailyTaskMain)
RPData:SetParent(RedPointType.QinglongSerectTreasure, RedPointType.DailyTaskMain)
RPData:SetParent(RedPointType.QinglongSerectTreasureTrail, RedPointType.DailyTaskMain)
RPData:SetParent(RedPointType.QinglongSerectTreasure, RedPointType.TreasureOfSl)
RPData:SetParent(RedPointType.QinglongSerectTreasureTrail, RedPointType.TreasureOfSl)
-- RPData:SetParent(RedPointType.QinglongSerectTreasure, RedPointType.TreasureOfSl)
-- RPData:SetParent(RedPointType.QinglongSerectTreasureTrail, RedPointType.TreasureOfSl)
RPData:SetParent(RedPointType.SecretTer_MaxBoxReward, RedPointType.SecretTer)
RPData:SetParent(RedPointType.SecretTer_HaveFreeTime, RedPointType.SecretTer)
RPData:SetParent(RedPointType.SecretTer_IsCanFight, RedPointType.SecretTer)