剧情提交
parent
941d3856a2
commit
07810200cb
Binary file not shown.
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 90 KiB |
|
@ -157,10 +157,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 +223,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)
|
||||
this.UI_Effect_ChuFaEffect_05.gameObject:SetActive(true)
|
||||
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 +260,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)
|
||||
end
|
||||
end
|
||||
end,data.groups[1],8,false):Start()
|
||||
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],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 +312,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 +502,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
|
||||
|
|
Loading…
Reference in New Issue