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 r_MapEffect_NewEvent_002.png
size: 256,512 size: 1024,1024
format: RGBA8888 format: RGBA8888
filter: Linear,Linear filter: Linear,Linear
repeat: none 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 bady
rotate: false rotate: false
xy: 2, 153 xy: 2, 347
size: 191, 142 size: 383, 284
orig: 191, 142 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 offset: 0, 0
index: -1 index: -1
tou tou
rotate: false rotate: true
xy: 130, 101 xy: 256, 146
size: 100, 50 size: 199, 99
orig: 100, 50 orig: 199, 99
offset: 0, 0 offset: 0, 0
index: -1 index: -1
tou1 tou1
rotate: false rotate: false
xy: 2, 25 xy: 2, 94
size: 126, 126 size: 252, 251
orig: 126, 126 orig: 252, 251
offset: 0, 0 offset: 0, 0
index: -1 index: -1
weiba weiba
rotate: false rotate: false
xy: 130, 49 xy: 387, 519
size: 73, 50 size: 146, 101
orig: 73, 50 orig: 146, 101
offset: 0, 0 offset: 0, 0
index: -1 index: -1
wq wq
rotate: false rotate: false
xy: 2, 297 xy: 2, 633
size: 221, 195 size: 441, 389
orig: 221, 195 orig: 441, 389
offset: 0, 0 offset: 0, 0
index: -1 index: -1
xiaoxingxing xiaoxingxing
rotate: false rotate: false
xy: 225, 477 xy: 256, 69
size: 12, 15 size: 25, 31
orig: 12, 15 orig: 25, 31
offset: 0, 0 offset: 0, 0
index: -1 index: -1
yanzhu yanzhu
rotate: false rotate: false
xy: 195, 287 xy: 719, 543
size: 5, 8 size: 11, 16
orig: 5, 8 orig: 11, 16
offset: 0, 0 offset: 0, 0
index: -1 index: -1
yanzhu2 yanzhu2
rotate: false rotate: false
xy: 130, 39 xy: 508, 457
size: 5, 8 size: 11, 17
orig: 5, 8 orig: 11, 17
offset: 0, 0 offset: 0, 0
index: -1 index: -1
zuiba zuiba
rotate: false rotate: false
xy: 2, 2 xy: 256, 102
size: 44, 21 size: 88, 42
orig: 44, 21 orig: 88, 42
offset: 0, 0 offset: 0, 0
index: -1 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,--发射 LAUCH = 10,--发射
TOUCH = 11,--轻按 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 = { PLAYER_WALK_DIR = {
--没有坐骑的时候 --没有坐骑的时候
IDLE = {animation = "idle", y = 0}, IDLE = {animation = "idle", y = 0},
IDLEBACK = {animation = "idle", y = 180}, IDLEBACK = {animation = "idle3", y = 0},
JINGYA = {animation = "jingya", y = 0}, JINGYA = {animation = "jingya", y = 0},
LAUCH = {animation = "lauch", y = 0}, LAUCH = {animation = "lauch", y = 0},
TOUCH = {animation = "touch", y = 0}, TOUCH = {animation = "touch", y = 0},

View File

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

View File

@ -411,9 +411,7 @@ function this.ExecuteBehavior(beType, beArgs)
local panel = c[1] local panel = c[1]
local nextId = c[2] local nextId = c[2]
if id == panel and UIManager.IsTopShow(panel) then if id == panel and UIManager.IsTopShow(panel) then
this.NextGuide(nextId) this.ShowStory(nextId,OnFocus)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, OnFocus)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnFocus, OnFocus)
return return
end end
end end
@ -475,6 +473,41 @@ function this.ExecuteBehavior(beType, beArgs)
end end
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) function this.ShowGuide(id)
this.id = id this.id = id
this.gameObject:GetComponent("Image").raycastTarget = true this.gameObject:GetComponent("Image").raycastTarget = true

View File

@ -112,10 +112,10 @@ MapFloatingConfig = {
scale = Vector3.New(0.2, 0.2, 0.2), scale = Vector3.New(0.2, 0.2, 0.2),
scale1 = Vector3.New(0.1, 0.1, 0.1), scale1 = Vector3.New(0.1, 0.1, 0.1),
position = Vector3.New(0, 40, 0)}, position = Vector3.New(0, 40, 0)},
[25] = {name = "live2d_npc_map_boy",--人 [25] = {name = "live2d_r_MapEffect_NewEvent_002",--人
scale = Vector3.New(0.2, 0.2, 0.2), scale = Vector3.New(0.05, 0.05, 0.05),
scale1 = Vector3.New(0.1, 0.1, 0.1), 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 this = RewardItemPopup
local userLevelData = ConfigManager.GetConfig(ConfigName.PlayerLevelConfig) local userLevelData = ConfigManager.GetConfig(ConfigName.PlayerLevelConfig)
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local itemListPrefab local itemListPrefab = {}
-- local itemListPrefabMax -- local itemListPrefabMax
local func local func
local bagType=0 --1 正常背包 2 临时背包 3 公会车迟显示 local bagType=0 --1 正常背包 2 临时背包 3 公会车迟显示
@ -99,6 +99,13 @@ end
--func 回调 --func 回调
function RewardItemPopup:OnOpen(...) function RewardItemPopup:OnOpen(...)
if #itemListPrefab > 0 then
for i = 1, #itemListPrefab do
destroy(itemListPrefab[i].gameObject)
end
end
itemListPrefab = {}
itemDataList = {}
isBackBattle = false isBackBattle = false
isPlayerAniEnd = true isPlayerAniEnd = true
isOpenGeiSSRAvtivity = 0 isOpenGeiSSRAvtivity = 0
@ -184,20 +191,28 @@ function RewardItemPopup:OnOpen(...)
end end
function this.InitGrid() function this.InitGrid()
this.dropGrid:SetActive(#itemDataList <= 20 ) this.dropGrid:SetActive(#itemDataList <= 25 )
this.dropGridArena:SetActive(#itemDataList > 20 ) this.dropGridArena:SetActive(#itemDataList > 25 )
itemListPrefab = {} -- LogYellow("itemListPrefab "..#itemListPrefab)
if #itemDataList <= 20 then -- LogYellow("itemDataList "..#itemDataList)
for i = 1, #itemListPrefab do
itemListPrefab[i].gameObject:SetActive(false)
end
if #itemDataList <= 25 then
for i = 1, #itemDataList do --初始缓存<= 20 for i = 1, #itemDataList do --初始缓存<= 20
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform) if not itemListPrefab[i] then
view.gameObject.name = "frame"..i local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
itemListPrefab[i] = view view.gameObject.name = "frame"..i
itemListPrefab[i] = view
end
end end
else else
for i = 1, #itemDataList do --初始缓存> 20 for i = 1, #itemDataList do --初始缓存> 20
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid2.transform) if not itemListPrefab[i] then
view.gameObject.name = "frame"..i local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid2.transform)
itemListPrefab[i] = view view.gameObject.name = "frame"..i
itemListPrefab[i] = view
end
end end
end end
end end
@ -278,7 +293,8 @@ function RewardItemPopup:OnSortingOrderChange()
if itemListPrefab[i] and itemDataList[i] then if itemListPrefab[i] and itemDataList[i] then
local view = itemListPrefab[i] local view = itemListPrefab[i]
local curItemData=itemDataList[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 end
end end
@ -291,70 +307,79 @@ function RewardItemPopup:SetItemShow(drop)
itemDataList[i].itemConfig = itemConfig[itemDataList[i].sId] itemDataList[i].itemConfig = itemConfig[itemDataList[i].sId]
end end
self:ItemDataListSort(itemDataList) self:ItemDataListSort(itemDataList)
for i = 1, math.max(#itemDataList, #itemListPrefab) do -- for i = 1, math.max(#itemDataList, #itemListPrefab) do
local go = itemListPrefab[i] -- local go = itemListPrefab[i]
if not go then -- if not go then
go = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform) -- go = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
go.gameObject.name = "frame"..i -- go.gameObject.name = "frame"..i
itemListPrefab[i] = go -- itemListPrefab[i] = go
end -- end
go.gameObject:SetActive(false) -- go.gameObject:SetActive(false)
end -- end
if #itemDataList <= 25 then
callList:Clear() 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)
callList:Push(function () callList:Push(function ()
local func = function() if isOpenGeiSSRAvtivityTime then
view.gameObject:SetActive(true) isOpenGeiSSRAvtivityTime:Stop()
local btn = Util.GetGameObject(view.gameObject, "item/frame"):GetComponent("Button") isOpenGeiSSRAvtivityTime = nil
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
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) 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 end
callList:Pop()()
end end
--存储本地 --存储本地
function this.SetItemData2(itemdata) function this.SetItemData2(itemdata)
@ -452,6 +477,9 @@ function RewardItemPopup:OnClose()
end end
--检测是否需要弹每日任务飘窗 --检测是否需要弹每日任务飘窗
TaskManager.RefreshShowDailyMissionTipPanel() TaskManager.RefreshShowDailyMissionTipPanel()
end
--界面销毁时调用(用于子类重写)
function RewardItemPopup:OnDestroy()
if #itemListPrefab > 0 then if #itemListPrefab > 0 then
for i = 1, #itemListPrefab do for i = 1, #itemListPrefab do
destroy(itemListPrefab[i].gameObject) destroy(itemListPrefab[i].gameObject)
@ -460,7 +488,4 @@ function RewardItemPopup:OnClose()
itemListPrefab = {} itemListPrefab = {}
itemDataList = {} itemDataList = {}
end end
--界面销毁时调用(用于子类重写)
function RewardItemPopup:OnDestroy()
end
return RewardItemPopup return RewardItemPopup

View File

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

View File

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

View File

@ -26,21 +26,21 @@ end
function MonsterLiveView:SetWalkDir(dir) function MonsterLiveView:SetWalkDir(dir)
if dir == WALK_DIR.IDLE_FRONT then-- 站立_向前 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-- 站立_向后 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-- 站立_向左 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-- 站立_向右 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-- 跑_向右 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-- 跑_向左 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-- 跑_向上 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-- 跑_向下 elseif dir == WALK_DIR.RUN_DOWN then-- 跑_向下
self:SetWalkDirInfo(PLAYER_WALK_DIR.DOWN) self:SetWalkDirInfo(MONSTER_WALK_DIR.RUN_DOWN)
end end
end end
function MonsterLiveView:SetWalkDirInfo(playerDir) function MonsterLiveView:SetWalkDirInfo(playerDir)

View File

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

View File

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