【缥缈之旅】提交3

dev_chengFeng
zhangqiang 2021-07-03 16:49:13 +08:00
parent 2f269ebfa8
commit 6af4522342
5 changed files with 6605 additions and 6395 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -0,0 +1,99 @@
fileFormatVersion: 2
guid: 5364a4d81faaf9847800c54e76f42aea
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
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 56
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: bdf9dfe191d033344982bd5c71008129
vertices: []
indices:
edges: []
weights: []
spritePackingTag: JourneyWithWindAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1286,17 +1286,28 @@ end
function this.GetJourneyWithWindDayAmount()
return JourneyWithWindDayAmount
end
--判断当前奖励是否可领取
function this.SingleJourneyWithWindRewardNoGet(curRewardTaskData)
if curRewardTaskData then
local dayNumConFig = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,curRewardTaskData.missionId)
LogYellow(curRewardTaskData.missionId .. " curRewardTaskData.state "..curRewardTaskData.state.." curRewardTaskData.progress "..curRewardTaskData.progress.." JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] "..JourneyWithWindDayAmount[dayNumConFig.Values[1][2]])
if curRewardTaskData.state == 0 and dayNumConFig and curRewardTaskData.progress >= JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] then
return true
end
end
return false
end
--缥缈之旅红点检测
function this.JourneyWithWindAllRedPointState()
-- local idJourneyWithWind = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.JourneyWithWind)
-- if idJourneyWithWind and idJourneyWithWind > 0 then
-- if this.JourneyWithWindRewardNoGet() then
-- return true
-- end
-- if this.JourneyWithWindCurDayNoOpen() then
-- return true
-- end
-- end
local idJourneyWithWind = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.JourneyWithWind)
if idJourneyWithWind and idJourneyWithWind > 0 then
if this.JourneyWithWindRewardNoGet() then
return true
end
if this.JourneyWithWindCurDayNoOpen() then
return true
end
end
return false
end
--1完成任务未领奖
@ -1318,16 +1329,6 @@ function this.JourneyWithWindRewardNoGet()
end
return false
end
function this.SingleJourneyWithWindRewardNoGet(curRewardTaskData)
if curRewardTaskData then
local dayNumConFig = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,curRewardTaskData.missionId)
LogYellow(curRewardTaskData.missionId .. " curRewardTaskData.state "..curRewardTaskData.state.." curRewardTaskData.progress "..curRewardTaskData.progress.." JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] "..JourneyWithWindDayAmount[dayNumConFig.Values[1][2]])
if curRewardTaskData.state == 0 and dayNumConFig and curRewardTaskData.progress >= JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] then
return true
end
end
return false
end
--2开启从未打开过
--本地存储字符串
function this.SetJourneyWithWindPlayerPrefs(dayNum,val)
@ -1338,13 +1339,14 @@ function this.GetJourneyWithWindPlayerPrefs(dayNum)
if dayNum then
return PlayerPrefs.GetString(PlayerManager.uid..PlayerManager.serverInfo.server_id.."JourneyWithWind"..dayNum, 0)
end
return false
end
function this.JourneyWithWindCurDayNoOpen()
local curDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
local curJourneyWithWindAllDayConFigData = this.GetJourneyWithWindAllDayConFigData()
for i = 1, #curJourneyWithWindAllDayConFigData do
if curJourneyWithWindAllDayConFigData[i].Values[1][2] <= curDay then
local curRedPointState = this.GetJourneyWithWindPlayerPrefs(curJourneyWithWindAllDayConFigData[i])
local curRedPointState = this.GetJourneyWithWindPlayerPrefs(curJourneyWithWindAllDayConFigData[i].Values[1][2])
if curRedPointState then
return true
end

View File

@ -12,6 +12,8 @@ local curDayAllTaskGos = {}--当前天所有任务go
local curDay
local activityData
local isGetState
local curRewardTaskData--奖励后端数据
local isOpenLock
-- this.UpView = nil
--初始化组件(用于子类重写)
function JourneyWithWindPanel:InitComponent()
@ -82,6 +84,9 @@ function JourneyWithWindPanel:OnShow()
this.ShowDayBtnsData()
this.ShowDayData(curDayIndex)
-- this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
-- this.selected.transform:SetParent(Util.GetGameObject(go, "selectedParent").transform)
-- this.selected.transform.anchoredPosition = Vector3.New(4.3,9.4,0)
end
function JourneyWithWindPanel:OnSortingOrderChange()
@ -104,11 +109,16 @@ function this.ShowDayBtnsData()
end
function this.SingleDayBtnDataShow(_go,data,index)
local go = Util.GetGameObject(_go, "dayPre")
Util.GetGameObject(go, "Text"):GetComponent("Text").text = string.format(Language[10528],data.Values[1][2])
Util.GetGameObject(go, "dayBg/Text"):GetComponent("Text").text = string.format(Language[10528],data.Values[1][2])
local iconItemId = ConfigManager.GetConfigData(ConfigName.ItemConfig,data.Reward[1][1])
Util.GetGameObject(go, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(iconItemId.ResourceID))
local redPoint = Util.GetGameObject(go, "redPoint")
local redState = false
if curDay >= data.Values[1][2] then
Util.SetGray(Util.GetGameObject(go, "dayBg"),false)
else
Util.SetGray(Util.GetGameObject(go, "dayBg"),true)
end
if activityData then
for j = 1, #activityData.mission do
if activityData.mission[j].missionId == data.Id then
@ -116,9 +126,9 @@ function this.SingleDayBtnDataShow(_go,data,index)
end
end
end
-- if not redState then
-- redState = ActivityGiftManager.GetJourneyWithWindPlayerPrefs(data.Values[1][2])
-- end
if not redState then
-- redState = ActivityGiftManager.GetJourneyWithWindPlayerPrefs(data.Values[1][2])
end
redPoint:SetActive(redState)
if index%2 == 0 then
@ -161,13 +171,12 @@ function this.ShowDayData(_curDayIndex)
Util.GetGameObject(curDayAllTaskGos[i], "pre1/condition"):GetComponent("Text").text = curDayAllTaskConFigData[i].Show
local btnJump = Util.GetGameObject(curDayAllTaskGos[i], "pre1/btnJump")
local btnFinish = Util.GetGameObject(curDayAllTaskGos[i], "pre1/btnFinish")
btnFinish:SetActive(false)
btnJump:SetActive(false)
Util.GetGameObject(btnJump, "get"):GetComponent("Text").text = "前往"
local btnJumpText = Util.GetGameObject(btnJump, "get"):GetComponent("Text")
local buyInfo = Util.GetGameObject(curDayAllTaskGos[i], "buyInfo"):GetComponent("Text")
Util.GetGameObject(curDayAllTaskGos[i], "headImage/name"):GetComponent("Text").text = curDayAllTaskConFigData[i].HeadName
btnFinish:SetActive(false)
btnJump:SetActive(false)
buyInfo.text = ""
Util.SetGray(btnJump,false)
local curMissionData
for j = 1, #AllTaskData do
if AllTaskData[j].missionId == curDayAllTaskConFigData[i].Id then
@ -175,29 +184,42 @@ function this.ShowDayData(_curDayIndex)
end
end
if curMissionData then
local isOpen = curDayAllTaskConFigData[i].SystemId or (curDayAllTaskConFigData[i].SystemId and curDayAllTaskConFigData[i].SystemId > 0 and ActTimeCtrlManager.SingleFuncState(curDayAllTaskConFigData[i].SystemId) )
local isOpen = (curDayAllTaskConFigData[i].SystemId and curDayAllTaskConFigData[i].SystemId > 0 and ActTimeCtrlManager.SingleFuncState(curDayAllTaskConFigData[i].SystemId) )
local progress = curMissionData.progress--任务进度
local state = curMissionData.state--任务状态 0:未完成 1完成未领取 2已达成已领取
if state == 1 or state == 2 then
btnFinish:SetActive(true)
elseif state == 0 then
btnJump:SetActive(true)
if isOpen then
btnJump:GetComponent("Button").enabled = true
if curDayAllTaskConFigData[i].TaskType ~= 14 then
buyInfo.text = string.format("%s/%s",progress,curDayAllTaskConFigData[i].TaskValue[2][1])
isOpenLock = curDay >= curDayIndex
Util.SetGray(btnJump,false)
if isOpenLock then--到天数
Util.SetGray(btnJump,false)
btnJumpText.text = "前往"
btnJump:GetComponent("Button").enabled = true
LogYellow("isOpen "..tostring(isOpen))
if isOpen then--功能是否开启
if state == 1 or state == 2 then--是否已达成
btnFinish:SetActive(true)
elseif state == 0 then
btnJump:SetActive(true)
btnJump:GetComponent("Button").enabled = true
if curDayAllTaskConFigData[i].TaskType ~= 14 then
buyInfo.text = string.format("%s/%s",progress,curDayAllTaskConFigData[i].TaskValue[2][1])
end
Util.AddOnceClick(btnJump, function()
JumpManager.GoJump(curDayAllTaskConFigData[i].Jump[1])
end)
end
Util.AddOnceClick(btnJump, function()
JumpManager.GoJump(curDayAllTaskConFigData[i].Jump[1])
end)
else
btnJump:SetActive(true)
Util.SetGray(btnJump,true)
btnJump:GetComponent("Button").enabled = false
if curDayAllTaskConFigData[i].TaskType ~= 14 then
buyInfo.text = string.format(Language[11903],ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,curDayAllTaskConFigData[i].SystemId).OpenRules[2])
end
end
else--未到天数
btnJump:SetActive(true)
Util.SetGray(btnJump,true)
btnJumpText.text = "未开启"
btnJump:GetComponent("Button").enabled = false
end
end
else
@ -215,7 +237,6 @@ function this.ShowDayDataActivityReward()
if go and curBtnConFigData and activityData then
Util.GetGameObject(go, "pre1"):SetActive(false)
Util.GetGameObject(go, "pre2"):SetActive(true)
local curRewardTaskData--奖励后端数据
for i = 1, #activityData.mission do
if activityData.mission[i].missionId == curBtnConFigData.Id then
curRewardTaskData = activityData.mission[i]
@ -237,33 +258,47 @@ function this.ShowDayDataActivityReward()
end
itemList[go.name][i].gameObject:SetActive(true)
end
isGetState = ActivityGiftManager.SingleJourneyWithWindRewardNoGet(curRewardTaskData)
local imageStr = isGetState and "s_slbz_1anniuongse" or "s_slbz_1anniuhuise"
local getBtn = Util.GetGameObject(go, "pre2/getBtn")
getBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(imageStr)
local btnText = Util.GetGameObject(getBtn, "get"):GetComponent("Text")
local redPoint = Util.GetGameObject(getBtn, "redPoint")
isGetState = ActivityGiftManager.SingleJourneyWithWindRewardNoGet(curRewardTaskData)
isOpenLock = curDay >= curDayIndex
local imageStr = isGetState and "s_slbz_1anniuongse" or "s_slbz_1anniuhuise"
getBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(imageStr)
redPoint:SetActive(isGetState)
Util.GetGameObject(go, "headImage/name"):GetComponent("Text").text = "奖励"
Util.GetGameObject(getBtn, "redPoint"):SetActive(isGetState)
btnText.text = "领取"
getBtn:GetComponent("Button").enabled = true
Util.AddOnceClick(getBtn, function()
if isGetState then
NetManager.GetActivityRewardRequest(curRewardTaskData.missionId, activityData.activityId, function(drop)
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
btnText.text = "已领取"
getBtn:GetComponent("Button").enabled = false
CheckRedPointStatus(RedPointType.JourneyWithWind)
end)
end)
if isOpenLock then
Util.SetGray(getBtn,false)
getBtn:GetComponent("Button").enabled = true
if curRewardTaskData.state == 1 then
btnText.text = "已领取"
getBtn:GetComponent("Button").enabled = false
Util.SetGray(getBtn,true)
else
if curRewardTaskData.state == 0 then
PopupTipPanel.ShowTip("完成当日所有目标才可领取!")
elseif curRewardTaskData.state == 1 then
btnText.text = "已领取"
getBtn:GetComponent("Button").enabled = false
end
Util.AddOnceClick(getBtn, function()
if isGetState then
NetManager.GetActivityRewardRequest(curRewardTaskData.missionId, activityData.activityId, function(drop)
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
btnText.text = "已领取"
getBtn:GetComponent("Button").enabled = false
Util.SetGray(getBtn,true)
redPoint:SetActive(false)
CheckRedPointStatus(RedPointType.JourneyWithWind)
end)
end)
else
if curRewardTaskData.state == 0 then
PopupTipPanel.ShowTip("完成当日所有目标才可领取!")
end
end
end)
end
end)
else
Util.SetGray(getBtn,true)
btnText.text = "未开启"
getBtn:GetComponent("Button").enabled = false
end
end
end
end
@ -290,32 +325,61 @@ function this.ShowDayDataGiftBag()
itemList[go.name][i].gameObject:SetActive(true)
end
local rechargeData = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.DirectPurchaseGift, rechargecommodityData.Id)
local freetimes = rechargeData.dynamicBuyTimes - rechargeData.buyTimes
local imageStr = "s_slbz_1anniuhuise"--freetimes > 0 and "s_slbz_1anniuongse" or "s_slbz_1anniuhuise"
local getBtn = Util.GetGameObject(go, "pre2/getBtn")
getBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(imageStr)
local btnText = Util.GetGameObject(getBtn, "get"):GetComponent("Text")
Util.GetGameObject(go, "headImage/name"):GetComponent("Text").text = "额外礼包"
local btnFinish = Util.GetGameObject(go, "pre2/btnFinish")
btnFinish:SetActive(freetimes <= 0)
getBtn:SetActive(freetimes > 0)
btnText.text = rechargecommodityData.Price
Util.AddOnceClick(getBtn, function()
if freetimes > 0 and isGetState then
btnFinish:SetActive(false)
Util.GetGameObject(go, "headImage/name"):GetComponent("Text").text = "额外礼包"
local isCurGetState = false
if curRewardTaskData then
local dayNumConFig = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,curRewardTaskData.missionId)
local list = ActivityGiftManager.GetJourneyWithWindDayAmount()
if dayNumConFig and curRewardTaskData.progress >= list[dayNumConFig.Values[1][2]] then
isCurGetState = true
end
end
local freetimes = rechargeData.dynamicBuyTimes - rechargeData.buyTimes
local imageStr = (freetimes > 0 and isCurGetState) and "s_slbz_1anniuongse" or "s_slbz_1anniuhuise"
getBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(imageStr)
btnText.text = "领取"
if isOpenLock then--是否到天数
Util.SetGray(getBtn,false)
getBtn:GetComponent("Button").enabled = true
if freetimes > 0 and isCurGetState then
btnText.text = rechargecommodityData.Price
elseif freetimes <= 0 then
btnText.text = "已购买"
getBtn:GetComponent("Button").enabled = false
Util.SetGray(getBtn,true)
end
Util.AddOnceClick(getBtn, function()
if freetimes > 0 and isCurGetState then
PayManager.Pay(rechargecommodityData.Id, function(id)
FirstRechargeManager.RefreshAccumRechargeValue(rechargecommodityData.Id)
btnFinish:SetActive(true)
btnText.text = "已购买"
getBtn:GetComponent("Button").enabled = false
Util.SetGray(getBtn,true)
end)
else
else
PopupTipPanel.ShowTip("完成当日所有目标才可购买!")
end
end)
end
end)
else
Util.SetGray(getBtn,true)
btnText.text = "未开启"
getBtn:GetComponent("Button").enabled = false
end
end
end
--活动到期自动关闭
function this.AutoClose()
LogYellow("sssssssssssssssssssssssssss")
if this.timer then
this.timer:Stop()
this.timer = nil