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

dev_chengFeng
gaoxin 2021-04-27 20:53:42 +08:00
commit 9b4ce2d96a
13 changed files with 545 additions and 174 deletions

View File

@ -1,69 +1,251 @@
r_MapEffect_NewEvent_002.png
size: 256,512
size: 1024,1024
format: RGBA8888
filter: Linear,Linear
repeat: none
b_shenti_20
rotate: false
xy: 902, 720
size: 120, 127
orig: 120, 127
offset: 0, 0
index: -1
b_weiba_16
rotate: true
xy: 950, 851
size: 106, 61
orig: 106, 61
offset: 0, 0
index: -1
b_weijin_2
rotate: false
xy: 758, 849
size: 190, 173
orig: 190, 173
offset: 0, 0
index: -1
b_wuqi_1
rotate: false
xy: 445, 749
size: 311, 273
orig: 311, 273
offset: 0, 0
index: -1
b_youshou_12
rotate: false
xy: 387, 366
size: 83, 41
orig: 83, 41
offset: 0, 0
index: -1
b_youshou_13
rotate: true
xy: 950, 959
size: 63, 72
orig: 63, 72
offset: 0, 0
index: -1
b_youtui_17
rotate: true
xy: 663, 518
size: 41, 54
orig: 41, 54
offset: 0, 0
index: -1
b_youtui_18
rotate: true
xy: 234, 52
size: 40, 20
orig: 40, 20
offset: 0, 0
index: -1
b_zuoshou_10
rotate: true
xy: 357, 274
size: 71, 32
orig: 71, 32
offset: 0, 0
index: -1
b_zuoshou_11
rotate: true
xy: 659, 561
size: 59, 71
orig: 59, 71
offset: 0, 0
index: -1
b_zuotui_14
rotate: false
xy: 357, 180
size: 24, 31
orig: 24, 31
offset: 0, 0
index: -1
b_zuotui_15
rotate: true
xy: 535, 507
size: 48, 71
orig: 48, 71
offset: 0, 0
index: -1
bady
rotate: false
xy: 2, 153
size: 191, 142
orig: 191, 142
xy: 2, 347
size: 383, 284
orig: 383, 284
offset: 0, 0
index: -1
l_biyan_4
rotate: false
xy: 472, 378
size: 42, 29
orig: 42, 29
offset: 0, 0
index: -1
l_erduo_1
rotate: false
xy: 732, 559
size: 48, 61
orig: 48, 61
offset: 0, 0
index: -1
l_jiao_17
rotate: false
xy: 387, 409
size: 133, 46
orig: 133, 46
offset: 0, 0
index: -1
l_jiao_3
rotate: false
xy: 387, 457
size: 119, 60
orig: 119, 60
offset: 0, 0
index: -1
l_tou_5
rotate: true
xy: 902, 587
size: 131, 108
orig: 131, 108
offset: 0, 0
index: -1
l_weiba_20
rotate: false
xy: 2, 2
size: 136, 90
orig: 136, 90
offset: 0, 0
index: -1
l_weijin_6
rotate: true
xy: 357, 213
size: 59, 28
orig: 59, 28
offset: 0, 0
index: -1
l_weijin_9
rotate: false
xy: 787, 615
size: 113, 143
orig: 113, 143
offset: 0, 0
index: -1
l_wuqi_16
rotate: true
xy: 445, 622
size: 125, 340
orig: 125, 340
offset: 0, 0
index: -1
l_youshou_18
rotate: false
xy: 535, 557
size: 122, 63
orig: 122, 63
offset: 0, 0
index: -1
l_youtui_12
rotate: true
xy: 608, 510
size: 45, 53
orig: 45, 53
offset: 0, 0
index: -1
l_youtui_14
rotate: true
xy: 508, 476
size: 41, 25
orig: 41, 25
offset: 0, 0
index: -1
l_zuoshou_7
rotate: false
xy: 758, 760
size: 126, 87
orig: 126, 87
offset: 0, 0
index: -1
l_zuotui_10
rotate: true
xy: 140, 10
size: 82, 92
orig: 82, 92
offset: 0, 0
index: -1
tou
rotate: false
xy: 130, 101
size: 100, 50
orig: 100, 50
rotate: true
xy: 256, 146
size: 199, 99
orig: 199, 99
offset: 0, 0
index: -1
tou1
rotate: false
xy: 2, 25
size: 126, 126
orig: 126, 126
xy: 2, 94
size: 252, 251
orig: 252, 251
offset: 0, 0
index: -1
weiba
rotate: false
xy: 130, 49
size: 73, 50
orig: 73, 50
xy: 387, 519
size: 146, 101
orig: 146, 101
offset: 0, 0
index: -1
wq
rotate: false
xy: 2, 297
size: 221, 195
orig: 221, 195
xy: 2, 633
size: 441, 389
orig: 441, 389
offset: 0, 0
index: -1
xiaoxingxing
rotate: false
xy: 225, 477
size: 12, 15
orig: 12, 15
xy: 256, 69
size: 25, 31
orig: 25, 31
offset: 0, 0
index: -1
yanzhu
rotate: false
xy: 195, 287
size: 5, 8
orig: 5, 8
xy: 719, 543
size: 11, 16
orig: 11, 16
offset: 0, 0
index: -1
yanzhu2
rotate: false
xy: 130, 39
size: 5, 8
orig: 5, 8
xy: 508, 457
size: 11, 17
orig: 11, 17
offset: 0, 0
index: -1
zuiba
rotate: false
xy: 2, 2
size: 44, 21
orig: 44, 21
xy: 256, 102
size: 88, 42
orig: 88, 42
offset: 0, 0
index: -1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 335 KiB

View File

@ -2355,10 +2355,21 @@ WALK_DIR = {
LAUCH = 10,--发射
TOUCH = 11,--轻按
}
MONSTER_WALK_DIR = {
--没有坐骑的时候
IDLE = {animation = "idle", y = 0},
IDLEBACK = {animation = "idle_b", y = 0},
RIGHT = {animation = "idle_l", y = 180},
LEFT = {animation = "idle_l", y = 0},
RUN_RIGHT = {animation = "run_l", y = 180},
RUN_LEFT = {animation = "run_l", y = 0},
RUN_UP = {animation = "run_b", y = 0},
RUN_DOWN = {animation = "run_1", y = 0},
}
PLAYER_WALK_DIR = {
--没有坐骑的时候
IDLE = {animation = "idle", y = 0},
IDLEBACK = {animation = "idle", y = 180},
IDLEBACK = {animation = "idle3", y = 0},
JINGYA = {animation = "jingya", y = 0},
LAUCH = {animation = "lauch", y = 0},
TOUCH = {animation = "touch", y = 0},

View File

@ -44,6 +44,7 @@ function this.OnLevelChange()
-- 首充引导特殊处理到十级开放
if PlayerManager.level == 10 then
table.insert(_FuncGuideList, 100200)
StoryMapManager.isShowStory = true
this.CheckFuncGuide()
end
end
@ -112,6 +113,8 @@ end
-- 检测功能引导
function GuideManager.CheckFuncGuide()
for k,v in pairs(funcDic) do
end
if not GuideManager.IsInMainGuide() and not _IsFuncGuild and #_FuncGuideList > 0 then
local guideId = _FuncGuideList[1]
if not funcDic[guideId] then

View File

@ -411,9 +411,7 @@ function this.ExecuteBehavior(beType, beArgs)
local panel = c[1]
local nextId = c[2]
if id == panel and UIManager.IsTopShow(panel) then
this.NextGuide(nextId)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, OnFocus)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnFocus, OnFocus)
this.ShowStory(nextId,OnFocus)
return
end
end
@ -475,6 +473,41 @@ function this.ExecuteBehavior(beType, beArgs)
end
end
function this.ShowStory(nextId,OnFocus)
if StoryMapManager.isShowStory then
StoryMapManager.isShowStory = false
local isShowStory = 1
if PlayerPrefs.HasKey("StoryMapPanel1"..PlayerManager.uid) then
isShowStory = PlayerPrefs.GetInt("StoryMapPanel"..PlayerManager.uid)
end
if isShowStory == 1 then
LogGreen("this.gameObject:"..this.gameObject.name)
this.gameObject:SetActive(false)
Game.GlobalEvent:AddEvent(GameEvent.GuaJi.CloseStoryMapPanel,function()
this.GameSetActive(nextId,OnFocus)
end)
PlayerPrefs.SetInt("StoryMapPanel1"..PlayerManager.uid,0)
StoryMapManager.InitData(1)
else
this.NextGuide(nextId)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, OnFocus)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnFocus, OnFocus)
end
else
this.NextGuide(nextId)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, OnFocus)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnFocus, OnFocus)
end
end
function this.GameSetActive(nextId,OnFocus)
this.gameObject:SetActive(true)
Game.GlobalEvent:RemoveEvent(GameEvent.GuaJi.CloseStoryMapPanel,this.GameSetActive)
this.NextGuide(nextId)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, OnFocus)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnFocus, OnFocus)
end
function this.ShowGuide(id)
this.id = id
this.gameObject:GetComponent("Image").raycastTarget = true

View File

@ -112,10 +112,10 @@ MapFloatingConfig = {
scale = Vector3.New(0.2, 0.2, 0.2),
scale1 = Vector3.New(0.1, 0.1, 0.1),
position = Vector3.New(0, 40, 0)},
[25] = {name = "live2d_npc_map_boy",--人
scale = Vector3.New(0.2, 0.2, 0.2),
[25] = {name = "live2d_r_MapEffect_NewEvent_002",--人
scale = Vector3.New(0.05, 0.05, 0.05),
scale1 = Vector3.New(0.1, 0.1, 0.1),
position = Vector3.New(0, 40, 0)},
position = Vector3.New(0, 0, 0)},
}
-- 特效资源的相关数组

View File

@ -3,7 +3,7 @@ RewardItemPopup = Inherit(BasePanel)
local this = RewardItemPopup
local userLevelData = ConfigManager.GetConfig(ConfigName.PlayerLevelConfig)
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local itemListPrefab
local itemListPrefab = {}
-- local itemListPrefabMax
local func
local bagType=0 --1 正常背包 2 临时背包 3 公会车迟显示
@ -99,6 +99,13 @@ end
--func 回调
function RewardItemPopup:OnOpen(...)
if #itemListPrefab > 0 then
for i = 1, #itemListPrefab do
destroy(itemListPrefab[i].gameObject)
end
end
itemListPrefab = {}
itemDataList = {}
isBackBattle = false
isPlayerAniEnd = true
isOpenGeiSSRAvtivity = 0
@ -184,20 +191,28 @@ function RewardItemPopup:OnOpen(...)
end
function this.InitGrid()
this.dropGrid:SetActive(#itemDataList <= 20 )
this.dropGridArena:SetActive(#itemDataList > 20 )
itemListPrefab = {}
if #itemDataList <= 20 then
this.dropGrid:SetActive(#itemDataList <= 25 )
this.dropGridArena:SetActive(#itemDataList > 25 )
-- LogYellow("itemListPrefab "..#itemListPrefab)
-- LogYellow("itemDataList "..#itemDataList)
for i = 1, #itemListPrefab do
itemListPrefab[i].gameObject:SetActive(false)
end
if #itemDataList <= 25 then
for i = 1, #itemDataList do --初始缓存<= 20
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
view.gameObject.name = "frame"..i
itemListPrefab[i] = view
if not itemListPrefab[i] then
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
view.gameObject.name = "frame"..i
itemListPrefab[i] = view
end
end
else
for i = 1, #itemDataList do --初始缓存> 20
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid2.transform)
view.gameObject.name = "frame"..i
itemListPrefab[i] = view
if not itemListPrefab[i] then
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid2.transform)
view.gameObject.name = "frame"..i
itemListPrefab[i] = view
end
end
end
end
@ -278,7 +293,8 @@ function RewardItemPopup:OnSortingOrderChange()
if itemListPrefab[i] and itemDataList[i] then
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
-- view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
view:SetEffectLayer(self.sortingOrder)
end
end
end
@ -291,70 +307,79 @@ function RewardItemPopup:SetItemShow(drop)
itemDataList[i].itemConfig = itemConfig[itemDataList[i].sId]
end
self:ItemDataListSort(itemDataList)
for i = 1, math.max(#itemDataList, #itemListPrefab) do
local go = itemListPrefab[i]
if not go then
go = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
go.gameObject.name = "frame"..i
itemListPrefab[i] = go
end
go.gameObject:SetActive(false)
end
callList:Clear()
callList:Push(function ()
if isOpenGeiSSRAvtivityTime then
isOpenGeiSSRAvtivityTime:Stop()
isOpenGeiSSRAvtivityTime = nil
end
isOpenGeiSSRAvtivityTime = Timer.New(function ()
isPlayerAniEnd = true
if isOpenGeiSSRAvtivity > 0 then
HeroManager.DetectionOpenFiveStarActivity(isOpenGeiSSRAvtivity)
end
end, 0.5):Start()
--在关卡界面获得装备 刷新下btview成员红点
-- Game.GlobalEvent:DispatchEvent(GameEvent.Equip.EquipChange)
end)
for i = #itemDataList, 1, -1 do
isPlayerAniEnd = false
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
--view.gameObject:SetActive(false)
-- for i = 1, math.max(#itemDataList, #itemListPrefab) do
-- local go = itemListPrefab[i]
-- if not go then
-- go = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
-- go.gameObject.name = "frame"..i
-- itemListPrefab[i] = go
-- end
-- go.gameObject:SetActive(false)
-- end
if #itemDataList <= 25 then
callList:Clear()
callList:Push(function ()
local func = function()
view.gameObject:SetActive(true)
local btn = Util.GetGameObject(view.gameObject, "item/frame"):GetComponent("Button")
btn.enabled = false
PlayUIAnim(view.gameObject, function()
btn.enabled = true
end)
--改为后端更新
--this.SetItemData2(itemDataList[i])
Timer.New(function ()
isPopGetSSR = false
callList:Pop()()
end, 0.05):Start()
end
if curItemData.configData and curItemData.itemType==3 and curItemData.configData.Quality == 5 then
HeroManager.DetectionOpenFiveStarActivity(curItemData.configData.Star)
end
if curItemData.configData and curItemData.itemType==3 and curItemData.configData.Quality == 5 and showHero then
isPopGetSSR = true
isOpenGeiSSRAvtivity = curItemData.configData.Star
UIManager.OpenPanel(UIName.DropGetSSRHeroShopPanel,curItemData.backData, func)
elseif curItemData.configData and curItemData.itemType==1 and
(curItemData.configData.ItemType == ItemType.Title or curItemData.configData.ItemType == ItemType.Ride) then--皮肤 坐骑
-- isPopGetSSR = true
-- UIManager.OpenPanel(UIName.DropGetPlayerDecorateShopPanel,curItemData.backData, func)
func()
else
func()
if isOpenGeiSSRAvtivityTime then
isOpenGeiSSRAvtivityTime:Stop()
isOpenGeiSSRAvtivityTime = nil
end
isOpenGeiSSRAvtivityTime = Timer.New(function ()
isPlayerAniEnd = true
if isOpenGeiSSRAvtivity > 0 then
HeroManager.DetectionOpenFiveStarActivity(isOpenGeiSSRAvtivity)
end
end, 0.5):Start()
--在关卡界面获得装备 刷新下btview成员红点
-- Game.GlobalEvent:DispatchEvent(GameEvent.Equip.EquipChange)
end)
for i = #itemDataList, 1, -1 do
isPlayerAniEnd = false
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
view.gameObject:SetActive(false)
callList:Push(function ()
local func = function()
view.gameObject:SetActive(true)
local btn = Util.GetGameObject(view.gameObject, "item/frame"):GetComponent("Button")
btn.enabled = false
PlayUIAnim(view.gameObject, function()
btn.enabled = true
end)
--改为后端更新
--this.SetItemData2(itemDataList[i])
Timer.New(function ()
isPopGetSSR = false
callList:Pop()()
end, 0.05):Start()
end
if curItemData.configData and curItemData.itemType==3 and curItemData.configData.Quality == 5 then
HeroManager.DetectionOpenFiveStarActivity(curItemData.configData.Star)
end
if curItemData.configData and curItemData.itemType==3 and curItemData.configData.Quality == 5 and showHero then
isPopGetSSR = true
isOpenGeiSSRAvtivity = curItemData.configData.Star
UIManager.OpenPanel(UIName.DropGetSSRHeroShopPanel,curItemData.backData, func)
elseif curItemData.configData and curItemData.itemType==1 and
(curItemData.configData.ItemType == ItemType.Title or curItemData.configData.ItemType == ItemType.Ride) then--皮肤 坐骑
-- isPopGetSSR = true
-- UIManager.OpenPanel(UIName.DropGetPlayerDecorateShopPanel,curItemData.backData, func)
func()
else
func()
end
end)
end
callList:Pop()()
else
for i = 1, #itemDataList do
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
view.gameObject:SetActive(true)
end
end
callList:Pop()()
end
--存储本地
function this.SetItemData2(itemdata)
@ -452,6 +477,9 @@ function RewardItemPopup:OnClose()
end
--检测是否需要弹每日任务飘窗
TaskManager.RefreshShowDailyMissionTipPanel()
end
--界面销毁时调用(用于子类重写)
function RewardItemPopup:OnDestroy()
if #itemListPrefab > 0 then
for i = 1, #itemListPrefab do
destroy(itemListPrefab[i].gameObject)
@ -460,7 +488,4 @@ function RewardItemPopup:OnClose()
itemListPrefab = {}
itemDataList = {}
end
--界面销毁时调用(用于子类重写)
function RewardItemPopup:OnDestroy()
end
return RewardItemPopup

View File

@ -1,6 +1,7 @@
StoryMapManager = {}
local this = StoryMapManager
this.groupConfigs = {}
this.isShowStory = false
local storyMapConfig = ConfigManager.GetConfig(ConfigName.StoryMapConfig)
--初始化
function this.Initialize()

View File

@ -13,6 +13,8 @@ this.eventIndex = 0
this.showDiaLog = false
local lastLive2DId = 0
local sortingOrder = 0
local newSortingOrder = 0
--初始化组件(用于子类重写)
function StoryMapPanel:InitComponent()
this.map = Util.GetGameObject(self.gameObject,"bg/mapParent")
@ -73,6 +75,7 @@ end
--界面打开时调用(用于子类重写)
function StoryMapPanel:OnOpen(config)
sortingOrder = 0
this.PlayerGrouops = {}
this.triggerEvent = {}
curGroupConfig = config
@ -142,23 +145,12 @@ function StoryMapPanel:OnShow()
end
function this:StackPop()
-- local isEnterNext = true
-- for k,v in pairs(this.PlayerGrouops) do
-- if v.state == 1 then
-- isEnterNext = false
-- break
-- end
-- end
-- if isEnterNext then
LogGreen("前:"..this.callList:Count())
if this.callList:Count() > 0 then
this.callList:Pop()()
LogGreen("后:"..this.callList:Count())
else
LogGreen("进入下一场景")
StoryMapManager.GetSingleStoryConfig()
end
--end
if this.callList:Count() > 0 then
this.callList:Pop()()
else
sortingOrder = newSortingOrder
StoryMapManager.GetSingleStoryConfig()
end
end
function this:CheckTrigger(data,go)
@ -169,40 +161,126 @@ function this:CheckTrigger(data,go)
this:ShowDialog()
elseif data.eventType == 2 then
this.eventIndex = 0
this:RunMap()
this:RunMap(data.eventType)
elseif data.eventType == 3 then
this.eventIndex = 0
--PopupTipPanel.ShowTip("进入一场假战斗")
this:EnterFight()
elseif data.eventType == 4 then --符咒闪烁了一下
this.eventIndex = 0
PopupTipPanel.ShowTip("符咒闪烁了一下")
this:StackPop()
--PopupTipPanel.ShowTip("符咒闪烁了一下")
-- this:StackPop()
if not this.UI_Effect_ChuFaEffect_04 then
this.UI_Effect_ChuFaEffect_04 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_04", PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_04.name = "UI_Effect_ChuFaEffect_04"
this.UI_Effect_ChuFaEffect_04.transform:SetParent(this.effectRoot.transform)
this.UI_Effect_ChuFaEffect_04.transform.localPosition = Vector3.New(0,550,0)
this.UI_Effect_ChuFaEffect_04.transform.localScale = Vector3.one
end
this.UI_Effect_ChuFaEffect_04.gameObject:SetActive(true)
Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_04,newSortingOrder - sortingOrder)
Timer.New(function()
this.UI_Effect_ChuFaEffect_04.gameObject:SetActive(false)
this:StackPop()
end,data.groups[1],1,false):Start()
elseif data.eventType == 5 then --符咒闪烁后消失
this.eventIndex = 0
PopupTipPanel.ShowTip("符咒闪烁后消失")
if this.Maps and this.Maps[2] then
this.Maps[2].gameObject:SetActive(false)
end
this:StackPop()
elseif data.eventType == 6 then --符咒消失,金箍棒砸在主角和怪物中间。
this.eventIndex = 0
PopupTipPanel.ShowTip("符咒消失,金箍棒砸在主角和怪物中间。")
if not this.UI_Effect_ChuFaEffect_01 then
this.UI_Effect_ChuFaEffect_01 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_01", PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_01.name = "UI_Effect_ChuFaEffect_01"
this.UI_Effect_ChuFaEffect_01.transform:SetParent(this.effectRoot.transform)
this.UI_Effect_ChuFaEffect_01.transform.localPosition = Vector3.zero
this.UI_Effect_ChuFaEffect_01.transform.localScale = Vector3.one
end
Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_01,newSortingOrder - sortingOrder)
this.UI_Effect_ChuFaEffect_01.gameObject:SetActive(true)
Timer.New(function()
this.UI_Effect_ChuFaEffect_01.gameObject:SetActive(false)
end,data.groups[1],1,false):Start()
this:StackPop()
--PopupTipPanel.ShowTip("符咒消失,金箍棒砸在主角和怪物中间。")
-- this:StackPop()
elseif data.eventType == 7 then
this.eventIndex = 0
PopupTipPanel.ShowTip("随着光芒闪烁,一把从天而降的神剑插在了一只怪物面前。")
this:StackPop()
--PopupTipPanel.ShowTip("随着光芒闪烁,一把从天而降的神剑插在了一只怪物面前。")
if not this.UI_Effect_ChuFaEffect_02 then
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.zero
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 = Vector3.zero
this.UI_Effect_ChuFaEffect_05.transform.localScale = Vector3.one
end
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)
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()
--this:StackPop()
elseif data.eventType == 8 then
this.eventIndex = 0
PopupTipPanel.ShowTip("数把飞剑在主角身边依次落下,将身边一圈的怪物都扎死在剑下。随后剑放出光芒,形成环绕主角的法阵。")
this:StackPop()
--PopupTipPanel.ShowTip("数把飞剑在主角身边依次落下,将身边一圈的怪物都扎死在剑下。随后剑放出光芒,形成环绕主角的法阵。")
-- this:StackPop()
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 = Vector3.zero
this.effectBrowList[i].transform.localScale = Vector3.one
this.effectBrowList[i].gameObject:SetActive(false)
end
end
local indexTemp = 0
Timer.New(function()
indexTemp = indexTemp + 1
Util.AddParticleSortLayer(this.effectBrowList[indexTemp],newSortingOrder - sortingOrder)
this.effectBrowList[indexTemp].gameObject:SetActive(true)
end,data.groups[1],8,false):Start()
Timer.New(function()
for i = 1 ,#this.effectBrowList do
this.effectBrowList[i].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"
this.UI_Effect_ChuFaEffect_03.transform:SetParent(this.effectRoot.transform)
this.UI_Effect_ChuFaEffect_03.transform.localPosition = Vector3.zero
this.UI_Effect_ChuFaEffect_03.transform.localScale = Vector3.one
end
Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_03,newSortingOrder - sortingOrder)
this.UI_Effect_ChuFaEffect_03.gameObject:SetActive(true)
Timer.New(function()
this:StackPop()
end,data.groups[3],1,false):Start()
end,data.groups[2],1,false):Start()
elseif data.eventType == 9 then --等待几秒
this.eventIndex = 0
LogGreen("data.groups[1]:"..data.groups[1])
Timer.New(function()
this:StackPop()
end,data.groups[1],1,false):Start()
elseif data.eventType == 10 then --保持某方向移动
this.eventIndex = 0
this:RunMap()
this:RunMap(data.eventType)
end
end
@ -313,14 +391,14 @@ function this.ReSetLive2d()
Util.ClearChild(this.right2dRoot.transform)
end
function this:RunMap()
function this:RunMap(indexType)
if this.startTimer then
this.startTimer:Stop()
this.startTimer = nil
end
this.startTimer = Timer.New(function ()
for k,v in pairs(this.PlayerGrouops) do
v:RunMap()
v:RunMap(indexType)
end
end,0.1)
this.startTimer:Start()
@ -352,7 +430,7 @@ function this:RunMap()
end
function StoryMapPanel:OnSortingOrderChange()
newSortingOrder = self.sortingOrder
end
--界面关闭时调用(用于子类重写)
@ -366,6 +444,10 @@ function StoryMapPanel:OnClose()
this.startTimer = nil
end
lastLive2DId = 0
this.showDiaLog = false
this.dialog.gameObject:SetActive(false)
this.GoOn.gameObject:SetActive(false)
this.showImg:SetActive(false)
this.ReSetLive2d()
this.callList:Clear()
this.triggerEvent = {}
@ -378,6 +460,33 @@ function StoryMapPanel:OnClose()
this.startTimer1 = nil
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)
end
this.effectBrowList = nil
end
if this.UI_Effect_ChuFaEffect_01 then
poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_01", this.UI_Effect_ChuFaEffect_01, PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_01 = nil
end
if this.UI_Effect_ChuFaEffect_02 then
poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_02", this.UI_Effect_ChuFaEffect_02, PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_02 = nil
end
if this.UI_Effect_ChuFaEffect_03 then
poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_03", this.UI_Effect_ChuFaEffect_03, PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_03 = nil
end
if this.UI_Effect_ChuFaEffect_04 then
poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_04", this.UI_Effect_ChuFaEffect_04, PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_04 = nil
end
if this.UI_Effect_ChuFaEffect_05 then
poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_05", this.UI_Effect_ChuFaEffect_05, PoolManager.AssetType.GameObject)
this.UI_Effect_ChuFaEffect_05 = nil
end
end
--界面销毁时调用(用于子类重写)

View File

@ -26,21 +26,21 @@ end
function MonsterLiveView:SetWalkDir(dir)
if dir == WALK_DIR.IDLE_FRONT then-- 站立_向前
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE)
self:SetWalkDirInfo(MONSTER_WALK_DIR.IDLE)
elseif dir == WALK_DIR.IDLE_BACK then-- 站立_向后
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLEBACK)
self:SetWalkDirInfo(MONSTER_WALK_DIR.IDLEBACK)
elseif dir == WALK_DIR.IDLE_LEFT then-- 站立_向左
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE)
self:SetWalkDirInfo(MONSTER_WALK_DIR.LEFT)
elseif dir == WALK_DIR.IDLE_RIGHT then-- 站立_向右
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE)
self:SetWalkDirInfo(MONSTER_WALK_DIR.RIGHT)
elseif dir == WALK_DIR.RUN_RIGHT then-- 跑_向右
self:SetWalkDirInfo(PLAYER_WALK_DIR.RIGHT)
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_RIGHT)
elseif dir == WALK_DIR.RUN_LEFT then-- 跑_向左
self:SetWalkDirInfo(PLAYER_WALK_DIR.LEFT)
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_LEFT)
elseif dir == WALK_DIR.RUN_UP then-- 跑_向上
self:SetWalkDirInfo(PLAYER_WALK_DIR.UP)
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_UP)
elseif dir == WALK_DIR.RUN_DOWN then-- 跑_向下
self:SetWalkDirInfo(PLAYER_WALK_DIR.DOWN)
self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_DOWN)
end
end
function MonsterLiveView:SetWalkDirInfo(playerDir)

View File

@ -663,8 +663,9 @@ function SingleFightPlayerView:private_ShakeByTimes(_point, roleFaceDir, shakeTi
end
--整个东西缩一下
self:PlayScale(hurtGo, 0.7)
SoundManager.PlaySound(SoundConfig.Sound_FightArea_Attack[math.random(1, #SoundConfig.Sound_FightArea_Attack)])
if self.isSelf then
SoundManager.PlaySound(SoundConfig.Sound_FightArea_Attack[math.random(1, #SoundConfig.Sound_FightArea_Attack)])
end
end
local func = function()

View File

@ -74,12 +74,12 @@ function SingleStoryPlayerView:SetRoads0(data)
table.insert(self.roadsList[index],road)
end
end
for k,v in ipairs(self.roadsList) do
LogGreen("Monster k:"..k.." dirList:"..self.dirList[k])
for n,m in ipairs(v) do
LogGreen("Monster k:"..k.." n:"..n.." vec:"..tostring(m.vec))
end
end
-- for k,v in ipairs(self.roadsList) do
-- LogGreen("Monster k:"..k.." dirList:"..self.dirList[k])
-- for n,m in ipairs(v) do
-- LogGreen("Monster k:"..k.." n:"..n.." vec:"..tostring(m.vec))
-- end
-- end
self.startPos = self.roadsList[1][1].vec
local pointId = tonumber(data[1])
self.playerLiveView = MonsterLiveView:New(self.roleRoot,pointId)
@ -123,17 +123,17 @@ function SingleStoryPlayerView:SetRoads1(data)
table.insert(self.roadsList[index],road)
end
end
for k,v in ipairs(self.roadsList) do
LogGreen("Player k:"..k.." dirList:"..self.dirList[k])
for n,m in ipairs(v) do
LogGreen("Player k:"..k.." n:"..n.." vec:"..tostring(m.vec))
end
end
-- for k,v in ipairs(self.roadsList) do
-- LogGreen("Player k:"..k.." dirList:"..self.dirList[k])
-- for n,m in ipairs(v) do
-- LogGreen("Player k:"..k.." n:"..n.." vec:"..tostring(m.vec))
-- end
-- end
self.startPos = self.roadsList[1][1].vec
self:SetWalkDir(self.dirList[1])
end
function SingleStoryPlayerView:RunMap()
function SingleStoryPlayerView:RunMap(isSetRoleDir)
self.roadsIndex = 0
self.state = 1
self.index = self.index + 1
@ -152,7 +152,13 @@ function SingleStoryPlayerView:RunMap()
if data.indexType == 2 then
go = self.parent.map
end
local dis = math.abs(self:SetRoleDirAction(data.vec,go,data.indexType))
local dis
LogGreen("isSetRoleDir:"..isSetRoleDir)
if data.indexType == 2 or isSetRoleDir == 10 then
dis = math.abs(self:SetRoleDirAction(data.vec,go,false))
else
dis = math.abs(self:SetRoleDirAction(data.vec,go,true))
end
local speed = 0
if data.indexType ~= 0 then
speed = (1/600)*dis
@ -179,28 +185,28 @@ function SingleStoryPlayerView:SetRoleDirAction(pos,go,indexType)
local du = pos.x - go.transform.localPosition.x
local dy = pos.y - go.transform.localPosition.y
if du > 0 then
if indexType ~= 2 then
if indexType then
self:SetWalkDir(WALK_DIR.RUN_RIGHT)
self.eventpoint = 4
end
self.eventpoint = 4
return du
elseif du < 0 then
if indexType ~= 2 then
if indexType then
self:SetWalkDir(WALK_DIR.RUN_LEFT)
self.eventpoint = 3
end
self.eventpoint = 3
return du
elseif dy < 0 then
if indexType ~= 2 then
if indexType then
self:SetWalkDir(WALK_DIR.RUN_DOWN)
self.eventpoint = 1
end
self.eventpoint = 1
return dy
elseif dy > 0 then
if indexType ~= 2 then
if indexType then
self:SetWalkDir(WALK_DIR.RUN_UP)
self.eventpoint = 2
end
self.eventpoint = 2
return dy
end
return 0