【称号坐骑时装】中地图修改

dev_chengFeng
zhangqiang 2021-03-30 22:22:01 +08:00
parent bdcfd4cc65
commit 40cc3683f9
3 changed files with 27 additions and 63 deletions

View File

@ -40,15 +40,6 @@ function FightSmallChoosePanel:InitComponent()
-- SkeletonGraphic.transform.localEulerAngles = Vector3.New(0, 0, 0)
-- end
-- end
if self.liveNode == nil then
self.liveNode = PlayerLiveView:New(Util.GetTransform(self.selectMap, "pos"),1)
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
if FightPointPassManager.GetRoleDirection()==1 then
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
else
self.liveNode:SetWalkDir(WALK_DIR.RUN_RIGHT)
end
end
self.chapterInfo = Util.GetGameObject(self.gameObject, "chapterInfo")
self.titleText = Util.GetGameObject(self.gameObject, "chapterInfo/titleText"):GetComponent("Text")
@ -93,6 +84,17 @@ function FightSmallChoosePanel:OnShow()
--self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
self:OnShowPanelData()
SoundManager.PlaySound(SoundConfig.Sound_LittleMap)
if self.liveNode then
self.liveNode:OnClose()
end
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"),1)
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
if FightPointPassManager.GetRoleDirection()==1 then
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
else
self.liveNode:SetWalkDir(WALK_DIR.RUN_RIGHT)
end
end
--初始化界面
@ -112,7 +114,7 @@ function FightSmallChoosePanel:OnShowPanelData()
-- end
-- end
if self.liveNode == nil then
self.liveNode = PlayerLiveView:New(Util.GetTransform(self.selectMap, "pos"),1)
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"),1)
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
if FightPointPassManager.GetRoleDirection()==1 then
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
@ -186,13 +188,13 @@ function FightSmallChoosePanel:SelectRenPos(_parent)
end
--界面关闭时调用(用于子类重写)
function FightSmallChoosePanel:OnClose()
if self.liveNode then
self.liveNode:OnClose()
end
end
--界面销毁时调用(用于子类重写)
function FightSmallChoosePanel:OnDestroy()
if self.liveNode then
self.liveNode:OnClose()
end
--SubUIManager.Close(self.UpView)
smallListGo = {}

View File

@ -15,17 +15,6 @@ local offsetScale = math.min(Screen.width/3241, Screen.height/1920)
local rootParent = nil
-- local SkeletonGraphic
local curMiddleFightId = 0
-- 设置角色行走方向
-- local WALK_DIR = {
-- RIGHT = {animation = "move2", y = 0},
-- LEFT = {animation = "move2", y = 180},
-- UP = {animation = "move3", y = 0},
-- DOWN = {animation = "move", y = 0},
-- }
-- local mapNpc = "live2d_npc_map"
-- local mapNpc2 = "live2d_npc_map_nv"
-- local npc, scale
function this:InitComponent(root)
-- 地图点击拖动
@ -33,18 +22,6 @@ function this:InitComponent(root)
this.dragCtrl = Util.GetGameObject(root, "mapParent/Ctrl")
this.selectMap = Util.GetGameObject(root, "mapParent/selectMap")
-- npc = NameManager.roleSex == ROLE_SEX.BOY and mapNpc or mapNpc2
-- scale = NameManager.roleSex == ROLE_SEX.BOY and Vector3.one or Vector3.one * 0.5
-- this.liveNode = poolManager:LoadLive(npc, Util.GetTransform(root, "mapParent/selectMap/Image (1)/roleRoot"), scale, Vector3.zero)
-- SkeletonGraphic = self.liveNode:GetComponent("SkeletonGraphic")
-- if SkeletonGraphic then
-- SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
-- end
if this.liveNode then
this.liveNode:OnClose()
end
this.liveNode = PlayerLiveView:New(Util.GetTransform(root, "mapParent/selectMap/Image (1)/roleRoot"),1)
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
end
local IsPlayAni = false
local curSmallFightId = 0
@ -54,6 +31,11 @@ function this:Init(_curSmallFightId,_IsPlayAni,_openPanel)
IsPlayAni = _IsPlayAni
curSmallFightId = _curSmallFightId
openPanel = _openPanel
if this.liveNode then
this.liveNode:OnClose()
end
this.liveNode = PlayerLiveView:New(Util.GetGameObject(rootParent, "mapParent/selectMap/Image (1)/roleRoot"),1)
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
this:LoadMapData()
if IsPlayAni then
local time3 = Timer.New(function ()
@ -90,19 +72,6 @@ function this:LoadMapData()
-- 设置镜头的尺寸
TileMapController.SetScale(TileMapView.GetMapScale() * offsetScale)
-- if this.liveNode == nil then
-- npc = NameManager.roleSex == ROLE_SEX.BOY and mapNpc or mapNpc2
-- scale = NameManager.roleSex == ROLE_SEX.BOY and Vector3.one or Vector3.one * 0.5
-- this.liveNode = poolManager:LoadLive(npc, Util.GetTransform(root, "mapParent/selectMap/Image (1)/roleRoot"), scale, Vector3.zero)
-- SkeletonGraphic = self.liveNode:GetComponent("SkeletonGraphic")
-- if SkeletonGraphic then
-- SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
-- end
-- end
if this.liveNode == nil then
this.liveNode = PlayerLiveView:New(Util.GetTransform(rootParent, "mapParent/selectMap/Image (1)/roleRoot"),1)
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
end
this._BuildFlag = {}
this._BuildFlagClick = {}
this.selectMap:SetActive(false)
@ -173,10 +142,10 @@ function this.SetRoleWalk(middleFightId)
local pos = Vector3.New(oldMainLevelSettingConfig.ChapterRolePosition[1]+30, oldMainLevelSettingConfig.ChapterRolePosition[2]-100,100)
local targetPos = tagerPos
local speed = 5 -- 越大越慢
if this.liveNode == nil then
this.liveNode = PlayerLiveView:New(Util.GetTransform(rootParent, "mapParent/selectMap/Image (1)/roleRoot"),1)
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
end
-- if this.liveNode == nil then
-- this.liveNode = PlayerLiveView:New(Util.GetGameObject(rootParent, "mapParent/selectMap/Image (1)/roleRoot"),1)
-- this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
-- end
this.liveNode.leader.transform:DOLocalMove(targetPos, speed / 5, false):OnStart(function ()
this.SetRoleDirAction(targetPos.x, targetPos.y, pos.x, pos.y)
end):OnUpdate(function() --TODO:测试速度
@ -188,7 +157,6 @@ function this.SetRoleWalk(middleFightId)
openPanel:OnRefreshMiddleClick()
openPanel:OnRefreshBackClick()
end
-- SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
this.liveNode:SetWalkDir(WALK_DIR.IDLE_FRONT)
UIManager.OpenPanel(UIName.UnlockCheckpointPopup,FightPointPassManager.curOpenFight)
end):SetEase(Ease.Linear)
@ -211,8 +179,6 @@ function this.SetRoleDirAction(targetU, targetV, u0, v0)
end
function this.SetWalkDir(dir)
-- SkeletonGraphic.transform.localEulerAngles = Vector3.New(0, dir.y, 0)
-- SkeletonGraphic.AnimationState:SetAnimation(0, dir.animation, true)
this.liveNode:SetWalkDir(dir)
end
@ -277,11 +243,6 @@ function this.SelectRenPos(_parent,ChapterRolePosition)
end
end
function this:Dispose()
-- if this.liveNode then
-- this.liveNode.transform:SetParent(Util.GetGameObject(rootParent, "mapParent/selectMap/Image (1)/roleRoot").transform)
-- poolManager:UnLoadLive(npc, this.liveNode, PoolManager.AssetType.GameObject)
-- this.liveNode = nil
-- end
if this.liveNode then
this.liveNode:OnClose()
end

View File

@ -1760,8 +1760,9 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt
-- end
-- end
--end
--玩家称号 皮肤 坐骑属性加成
-- local playerDcorateAdd = PlayerManager.CalculatePlayerDcorateProAddVal()
local playerDcorateAdd = PlayerManager.CalculatePlayerDcorateProAddVal()
--if playerDcorateAdd and LengthOfTable(playerDcorateAdd) > 0 then
-- for i, v in pairs(playerDcorateAdd) do
-- if v > 0 then