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

dev_chengFeng
ZhangBiao 2021-04-28 00:08:54 +08:00
commit 34cb4d6f16
7 changed files with 55 additions and 42 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -206,7 +206,7 @@ RectTransform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3474375057190085441}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: 0, z: -1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6716452405183363615}

View File

@ -36,6 +36,7 @@ function StoryMapPanel:InitComponent()
this.GoOn = Util.GetGameObject(self.gameObject,"bg/btnGoOn")
this.btnGoOn = Util.GetGameObject(this.GoOn ,"Click")
this.GoOn.gameObject:SetActive(false)
this.skip = Util.GetGameObject(self.gameObject,"bg/btnSkip")
this.btnSkip = Util.GetGameObject(this.skip,"btnGo")
@ -44,6 +45,7 @@ function StoryMapPanel:InitComponent()
this.Maps = {}
this.btnBack = Util.GetGameObject(self.gameObject,"btnBack")
this.btnBack.gameObj:SetActive(false)
end
--绑定事件(用于子类重写)
@ -157,10 +159,10 @@ local pos = {
[2] = Vector3.New(0,0,0),
[3] = Vector3.New(130,0,0),
[4] = Vector3.New(-130,-144,0),
[5] = Vector3.New(130,-144,0),
[6] = Vector3.New(-130,-288,0),
[7] = Vector3.New(0,-288,0),
[8] = Vector3.New(130,-288,0),
[6] = Vector3.New(130,-144,0),
[7] = Vector3.New(-130,-288,0),
[8] = Vector3.New(0,-288,0),
[9] = Vector3.New(130,-288,0),
}
function this:CheckTrigger(data,go)
@ -223,31 +225,35 @@ function this:CheckTrigger(data,go)
this.UI_Effect_ChuFaEffect_02 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_02", PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_02.name = "UI_Effect_ChuFaEffect_02"
this.UI_Effect_ChuFaEffect_02.transform:SetParent(this.effectRoot.transform)
this.UI_Effect_ChuFaEffect_02.transform.localPosition = Vector3.New(0,-300,0)
this.UI_Effect_ChuFaEffect_02.transform.localPosition = Vector3.New(-415,700,0)
this.UI_Effect_ChuFaEffect_02.transform.localScale = Vector3.one
end
if not this.UI_Effect_ChuFaEffect_05 then
this.UI_Effect_ChuFaEffect_05 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_05", PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_05.name = "UI_Effect_ChuFaEffect_05"
this.UI_Effect_ChuFaEffect_05.transform:SetParent(this.effectRoot.transform)
this.UI_Effect_ChuFaEffect_05.transform.localPosition = pos[7]
this.UI_Effect_ChuFaEffect_05.transform.localPosition = pos[8]
this.UI_Effect_ChuFaEffect_05.transform.localScale = Vector3.one
end
this.UI_Effect_ChuFaEffect_05.gameObject:SetActive(false)
Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_02,newSortingOrder - sortingOrder)
Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_05,newSortingOrder - sortingOrder)
this.UI_Effect_ChuFaEffect_02.gameObject:SetActive(true)
Timer.New(function()
this.UI_Effect_ChuFaEffect_02.gameObject:SetActive(false)
this.UI_Effect_ChuFaEffect_05.gameObject:SetActive(true)
end,data.groups[1],1,false):Start()
Timer.New(function()
if this.PlayerGrouops and this.PlayerGrouops[7] then
this.PlayerGrouops[7]:SetWalkDir(WALK_DIR.DEAD_BACK)
end
end,0.5,1,false):Start()
end,(data.groups[1] + 0.5),1,false):Start()
Timer.New(function()
this.UI_Effect_ChuFaEffect_02.gameObject:SetActive(false)
this.UI_Effect_ChuFaEffect_05.gameObject:SetActive(false)
this:StackPop()
end,data.groups[1],1,false):Start()
end,(data.groups[1] + 0.5 + 1),1,false):Start()
--this:StackPop()
elseif data.eventType == 8 then
this.eventIndex = 0
@ -256,40 +262,47 @@ function this:CheckTrigger(data,go)
if not this.effectBrowList then
this.effectBrowList = {}
end
for i = 1, 8 do
if not this.effectBrowList[i] then
this.effectBrowList[i] = poolManager:LoadAsset("UI_Effect_ChuFaEffect_05", PoolManager.AssetType.GameObject)
this.effectBrowList[i].name = "UI_Effect_ChuFaEffect_05"
this.effectBrowList[i].transform:SetParent(this.effectRoot.transform)
this.effectBrowList[i].transform.localPosition = pos[i]
this.effectBrowList[i].transform.localScale = Vector3.one
this.effectBrowList[i].gameObject:SetActive(false)
local tempList = {7,4,1,2,3,6,9}
for k,v in pairs(tempList) do
if not this.effectBrowList[v] then
this.effectBrowList[v] = poolManager:LoadAsset("UI_Effect_ChuFaEffect_05", PoolManager.AssetType.GameObject)
this.effectBrowList[v].name = "UI_Effect_ChuFaEffect_05"
this.effectBrowList[v].transform:SetParent(this.effectRoot.transform)
this.effectBrowList[v].transform.localPosition = pos[v]
this.effectBrowList[v].transform.localScale = Vector3.one
this.effectBrowList[v].gameObject:SetActive(false)
end
end
local indexTemp = 0
LogGreen("this.PlayerGrouops[indexTemp]:"..LengthOfTable(this.PlayerGrouops))
Timer.New(function()
indexTemp = indexTemp + 1
Util.AddParticleSortLayer(this.effectBrowList[indexTemp],newSortingOrder - sortingOrder)
this.effectBrowList[indexTemp].gameObject:SetActive(true)
if this.PlayerGrouops and this.PlayerGrouops[indexTemp] then
LogGreen("indexTemp:"..indexTemp)
if indexTemp > 0 and indexTemp < 4 then
this.PlayerGrouops[indexTemp]:SetWalkDir(WALK_DIR.DEAD_FRONT)
elseif indexTemp == 4 then
this.PlayerGrouops[indexTemp]:SetWalkDir(WALK_DIR.DEAD_LEFT)
elseif indexTemp == 5 then
this.PlayerGrouops[indexTemp]:SetWalkDir(WALK_DIR.DEAD_RIGHT)
elseif indexTemp > 5 and indexTemp < 9 then
this.PlayerGrouops[indexTemp]:SetWalkDir(WALK_DIR.DEAD_BACK)
Util.AddParticleSortLayer(this.effectBrowList[tempList[indexTemp]],newSortingOrder - sortingOrder)
this.effectBrowList[tempList[indexTemp]].gameObject:SetActive(true)
local index = 0
if tempList[indexTemp] < 5 then
index = tempList[indexTemp]
else
index = tempList[indexTemp] - 1
end
LogGreen("index:"..index.." this.PlayerGrouops[index]:"..tostring(this.PlayerGrouops[index]))
if this.PlayerGrouops and this.PlayerGrouops[index] then
if index > 0 and index < 4 then
this.PlayerGrouops[index]:SetWalkDir(WALK_DIR.DEAD_FRONT)
elseif index == 4 then
this.PlayerGrouops[index]:SetWalkDir(WALK_DIR.DEAD_LEFT)
elseif index == 5 then
this.PlayerGrouops[index]:SetWalkDir(WALK_DIR.DEAD_RIGHT)
elseif index > 5 and index < 9 then
this.PlayerGrouops[index]:SetWalkDir(WALK_DIR.DEAD_BACK)
end
end
end,data.groups[1],8,false):Start()
end,data.groups[1],7,false):Start()
Timer.New(function()
for i = 1 ,#this.effectBrowList do
this.effectBrowList[i].gameObject:SetActive(false)
for k,v in pairs(this.effectBrowList) do
v.gameObject:SetActive(false)
end
if not this.UI_Effect_ChuFaEffect_03 then
this.UI_Effect_ChuFaEffect_03 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_03", PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_03.name = "UI_Effect_ChuFaEffect_03"
@ -301,7 +314,7 @@ function this:CheckTrigger(data,go)
this.UI_Effect_ChuFaEffect_03.gameObject:SetActive(true)
Timer.New(function()
this:StackPop()
end,data.groups[3],1,false):Start()
end,1.3,1,false):Start()
end,data.groups[2],1,false):Start()
elseif data.eventType == 9 then --等待几秒
this.eventIndex = 0
@ -491,9 +504,9 @@ function StoryMapPanel:OnClose()
end
this.map.transform.localPosition = Vector3.New(0,0,0)
if this.effectBrowList then
for i = 1 ,#this.effectBrowList do
this.effectBrowList[i].gameObject:SetActive(false)
poolManager:UnLoadAsset(this.effectBrowList[i].name, this.effectBrowList[i], PoolManager.AssetType.GameObject)
for k ,v in pairs(this.effectBrowList) do
v.gameObject:SetActive(false)
poolManager:UnLoadAsset(v.name, v, PoolManager.AssetType.GameObject)
end
this.effectBrowList = nil
end