Merge branch 'china/dev' into china/test
commit
0c0c757e11
|
|
@ -61,13 +61,12 @@ end
|
|||
function JourneyWithWindPanel:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnActivityOpenOrClose, this.AutoClose)
|
||||
end
|
||||
|
||||
local curServerDay
|
||||
--界面打开时调用(用于子类重写)
|
||||
function JourneyWithWindPanel:OnOpen(_curDayIndex)
|
||||
|
||||
allBtnsConFigData = ActivityGiftManager.GetJourneyWithWindAllDayConFigData()
|
||||
local curServerDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
|
||||
|
||||
curServerDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
|
||||
for i = 1, #allBtnsConFigData do
|
||||
if curServerDay >= allBtnsConFigData[i].Values[1][2] then
|
||||
curDay = allBtnsConFigData[i].Values[1][2]
|
||||
|
|
@ -112,22 +111,11 @@ function this.SingleDayBtnDataShow(_go,data,index)
|
|||
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
|
||||
if curServerDay >= 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
|
||||
redState = ActivityGiftManager.SingleJourneyWithWindRewardNoGet(activityData.mission[j])
|
||||
end
|
||||
end
|
||||
end
|
||||
if not redState and curDay >= data.Values[1][2] then
|
||||
redState = tonumber(ActivityGiftManager.GetJourneyWithWindPlayerPrefs(data.Values[1][2])) == 0
|
||||
end
|
||||
redPoint:SetActive(redState)
|
||||
--上方按钮一个高一个低
|
||||
if index%2 == 0 then
|
||||
go.transform.anchoredPosition = Vector3.New(3.05,23,0)
|
||||
|
|
@ -137,8 +125,19 @@ function this.SingleDayBtnDataShow(_go,data,index)
|
|||
if data.Values[1][2] == curDayIndex then--初始化按钮选中状态
|
||||
this.selected.transform:SetParent(Util.GetGameObject(go, "selectedParent").transform)
|
||||
this.selected.transform.anchoredPosition = Vector3.New(4.3,9.4,0)
|
||||
redPoint:SetActive(false)
|
||||
ActivityGiftManager.SetJourneyWithWindPlayerPrefs(curDayIndex,1)
|
||||
end
|
||||
if activityData then
|
||||
for j = 1, #activityData.mission do
|
||||
if activityData.mission[j].missionId == data.Id then
|
||||
redState = ActivityGiftManager.SingleJourneyWithWindRewardNoGet(activityData.mission[j])
|
||||
end
|
||||
end
|
||||
end
|
||||
if not redState and curServerDay >= data.Values[1][2] then
|
||||
redState = tonumber(ActivityGiftManager.GetJourneyWithWindPlayerPrefs(data.Values[1][2])) == 0
|
||||
end
|
||||
redPoint:SetActive(redState)
|
||||
Util.AddOnceClick(go, function()
|
||||
this.ShowDayData(data.Values[1][2])--点击按钮刷新界面
|
||||
this.selected.transform:SetParent(Util.GetGameObject(go, "selectedParent").transform)
|
||||
|
|
@ -212,7 +211,7 @@ function this.ShowDayData(_curDayIndex)
|
|||
end
|
||||
local progress = curMissionData.progress--任务进度
|
||||
local state = curMissionData.state--任务状态 0:未完成 1:完成未领取 2:已达成(已领取)
|
||||
isOpenLock = curDay >= curDayIndex
|
||||
isOpenLock = curServerDay >= curDayIndex
|
||||
Util.SetGray(btnJump,false)
|
||||
if isOpenLock then--到天数
|
||||
btnJump.transform.anchoredPosition = Vector3.New(262.41,44.5,0)
|
||||
|
|
@ -315,7 +314,7 @@ function this.ShowDayDataActivityReward()
|
|||
local btnText = Util.GetGameObject(getBtn, "get"):GetComponent("Text")
|
||||
local redPoint = Util.GetGameObject(getBtn, "redPoint")
|
||||
isGetState = ActivityGiftManager.SingleJourneyWithWindRewardNoGet(curRewardTaskData)
|
||||
isOpenLock = curDay >= curDayIndex
|
||||
isOpenLock = curServerDay >= curDayIndex
|
||||
local imageStr = isGetState and "s_slbz_1anniuongse" or "s_slbz_1anniuhuise"
|
||||
getBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(imageStr)
|
||||
redPoint:SetActive(isGetState)
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
|
|||
self.desc.text = string.format("<color=#%s>%s:%s/%s</color>",color,ItemConfig[self.needChipId].Name,itemcount,self.needChipNum)
|
||||
elseif self.jumpSData.Type == JumpType.recharge then
|
||||
self.costIconPos.gameObject:SetActive(false)
|
||||
self.desc.text = "快速提升孙悟空星级"
|
||||
self.desc.text = string.format("快速提升%s星级",heroConfig.ReadingName)
|
||||
elseif self.jumpSData.Type == 40 then
|
||||
self.costIconPos.gameObject:SetActive(false)
|
||||
self.desc.text = "助力玉帝升星"
|
||||
|
|
|
|||
|
|
@ -143,45 +143,49 @@ namespace GameEditor.Util
|
|||
string[] files = Directory.GetFiles(desPath);
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
{
|
||||
string sourceExt = Path.GetExtension(files[i]);
|
||||
if (sourceExt == ".meta")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string fileName = Path.GetFileName(files[i]);
|
||||
string sourceFileName = Path.GetFileNameWithoutExtension(files[i]);
|
||||
if (sourceFileName.EndsWith("_zh"))
|
||||
{
|
||||
sourceFileName = sourceFileName.Substring(0, sourceFileName.Length - 3);
|
||||
}
|
||||
string sourceExt = Path.GetExtension(files[i]);
|
||||
|
||||
}
|
||||
string[] guids = AssetDatabase.FindAssets(sourceFileName + " t:Texture",new string[] { tag1 });
|
||||
if (guids == null || guids.Length < 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
bool isReplace = false;
|
||||
for (int j = 0; j < guids.Length; j++)
|
||||
if (guids != null && guids.Length > 0)
|
||||
{
|
||||
string desFilePath = AssetDatabase.GUIDToAssetPath(guids[j]);
|
||||
string rootPath = Path.GetDirectoryName(desFilePath);
|
||||
string desfileName = Path.GetFileName(desFilePath);
|
||||
string desFileNameWithoutExt = Path.GetFileNameWithoutExtension(desFilePath);
|
||||
if (desFileNameWithoutExt.EndsWith("_zh"))
|
||||
for (int j = 0; j < guids.Length; j++)
|
||||
{
|
||||
desFileNameWithoutExt = desFileNameWithoutExt.Substring(0, desFileNameWithoutExt.Length - 3);
|
||||
}
|
||||
string desExt = Path.GetExtension(desFilePath);
|
||||
if (sourceFileName == desFileNameWithoutExt)
|
||||
{
|
||||
isReplace = true;
|
||||
if (sourceExt == desExt)
|
||||
string desFilePath = AssetDatabase.GUIDToAssetPath(guids[j]);
|
||||
string rootPath = Path.GetDirectoryName(desFilePath);
|
||||
string desfileName = Path.GetFileName(desFilePath);
|
||||
string desFileNameWithoutExt = Path.GetFileNameWithoutExtension(desFilePath);
|
||||
if (desFileNameWithoutExt.EndsWith("_zh"))
|
||||
{
|
||||
AssetDatabase.CopyAsset("Assets/ImportFloder/" + fileName, desFilePath);
|
||||
desFileNameWithoutExt = desFileNameWithoutExt.Substring(0, desFileNameWithoutExt.Length - 3);
|
||||
}
|
||||
else
|
||||
string desExt = Path.GetExtension(desFilePath);
|
||||
if (sourceFileName == desFileNameWithoutExt)
|
||||
{
|
||||
AssetDatabase.MoveAssetToTrash(desFilePath);
|
||||
AssetDatabase.MoveAsset("Assets/ImportFloder/" + fileName, rootPath + "/" + fileName);
|
||||
isReplace = true;
|
||||
if (sourceExt == desExt)
|
||||
{
|
||||
AssetDatabase.CopyAsset("Assets/ImportFloder/" + fileName, desFilePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
AssetDatabase.MoveAssetToTrash(desFilePath);
|
||||
AssetDatabase.MoveAsset("Assets/ImportFloder/" + fileName, rootPath + "/" + fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isReplace)
|
||||
{
|
||||
AssetDatabase.MoveAsset("Assets/ImportFloder/" + fileName, Path.Combine(tag1, path) + "/" + fileName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue