【称号坐骑时装】修改
parent
0aad3aa01a
commit
25e351dba3
File diff suppressed because it is too large
Load Diff
|
@ -778,6 +778,7 @@ RedPointType = {
|
|||
Friend_Application = 2302, -- 好友申请红点
|
||||
--- 设置界面红点 ----
|
||||
Setting_Head = 2311,
|
||||
Setting_Ride = 2312,
|
||||
--- 头像改变界面红点 ------
|
||||
HeadChange_Frame = 23111,
|
||||
HeadChange_Head = 23112,
|
||||
|
@ -2354,3 +2355,9 @@ PlayerHeadIconType = {
|
|||
Ride = 4,
|
||||
Skin = 5,
|
||||
}
|
||||
|
||||
PlayerTitleRideSkinRedPointTypeStr = {
|
||||
Skin = "PlayerSkin",
|
||||
Ride = "PlayerRide",
|
||||
Title = "PlayerTitle",
|
||||
}
|
|
@ -1886,3 +1886,6 @@ function JingJiShouWeiToEn(_str)
|
|||
LogGreen("return str:".._str)
|
||||
return _str
|
||||
end
|
||||
function GetPlayerRoleSingleConFig()
|
||||
return ConfigManager.GetConfigDataByKey(ConfigName.PlayerRole,"Role",0)
|
||||
end
|
|
@ -158,8 +158,9 @@ function AdventureExploreRewardPanel:SetItemShow(drop,dataList,transform,callLi
|
|||
elseif curItemData.configData and curItemData.itemType==1 and
|
||||
(curItemData.configData.ItemType == ItemType.Title or curItemData.configData.ItemType == ItemType.Ride or
|
||||
curItemData.configData.ItemType == ItemType.Skin) then--皮肤 坐骑
|
||||
isPopGetSSR = true
|
||||
UIManager.OpenPanel(UIName.DropGetPlayerDecorateShopPanel,curItemData.backData, func)
|
||||
-- isPopGetSSR = true
|
||||
-- UIManager.OpenPanel(UIName.DropGetPlayerDecorateShopPanel,curItemData.backData, func)
|
||||
func()
|
||||
else
|
||||
func()
|
||||
end
|
||||
|
|
|
@ -151,7 +151,7 @@ function DemonSlayerPanel:SetRank(ActInfo)
|
|||
designation = allRankData[i].userTitle
|
||||
}
|
||||
npcList[i] = PlayerLiveView:New(livePrefab.transform,2, curPlayerLiveViewData)
|
||||
npcList[i]:OnOpen(25,nil,WALK_DIR.IDLE_LEFT)
|
||||
npcList[i]:OnOpen(GetPlayerRoleSingleConFig().Scale11,nil,WALK_DIR.IDLE_LEFT)
|
||||
else
|
||||
image.enabled = true
|
||||
item.text = Language[10423]
|
||||
|
|
|
@ -73,7 +73,7 @@ function ExpeditionMainPanel:InitComponent()
|
|||
self.liveNode:OnClose()
|
||||
end
|
||||
self.liveNode = PlayerLiveView:New(Util.GetTransform(self.parent, "playerLive"),1)
|
||||
self.liveNode:OnOpen(18,nil,WALK_DIR.IDLE_FRONT)
|
||||
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale10,nil,WALK_DIR.IDLE_FRONT)
|
||||
|
||||
self.singlePre = Util.GetGameObject(self.transform, "singlePre")
|
||||
self.grid = Util.GetGameObject(self.transform, "rect/grid")
|
||||
|
|
|
@ -791,7 +791,7 @@ function this.RefreshLittleMap()
|
|||
this.liveNode:OnClose()
|
||||
end
|
||||
this.liveNode = PlayerLiveView:New(this.btnMap.transform,1)
|
||||
this.liveNode:OnOpen(6,Vector3.New(0,-40,0))
|
||||
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale3,Vector3.New(0,-40,0))
|
||||
if FightPointPassManager.GetRoleDirection()==1 then
|
||||
this.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
|
||||
else
|
||||
|
|
|
@ -42,7 +42,7 @@ function FightSmallChoosePanel:InitComponent()
|
|||
-- end
|
||||
if self.liveNode == nil then
|
||||
self.liveNode = PlayerLiveView:New(Util.GetTransform(self.selectMap, "pos"),1)
|
||||
self.liveNode:OnOpen(40,Vector3.New(0,40,0))
|
||||
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
|
||||
if FightPointPassManager.GetRoleDirection()==1 then
|
||||
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
|
||||
else
|
||||
|
@ -113,7 +113,7 @@ function FightSmallChoosePanel:OnShowPanelData()
|
|||
-- end
|
||||
if self.liveNode == nil then
|
||||
self.liveNode = PlayerLiveView:New(Util.GetTransform(self.selectMap, "pos"),1)
|
||||
self.liveNode:OnOpen(40,Vector3.New(0,40,0))
|
||||
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
|
||||
if FightPointPassManager.GetRoleDirection()==1 then
|
||||
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
|
||||
else
|
||||
|
|
|
@ -44,7 +44,7 @@ function this:InitComponent(root)
|
|||
this.liveNode:OnClose()
|
||||
end
|
||||
this.liveNode = PlayerLiveView:New(Util.GetTransform(root, "mapParent/selectMap/Image (1)/roleRoot"),1)
|
||||
this.liveNode:OnOpen(140,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
|
||||
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
|
||||
end
|
||||
local IsPlayAni = false
|
||||
local curSmallFightId = 0
|
||||
|
@ -101,7 +101,7 @@ function this:LoadMapData()
|
|||
-- end
|
||||
if this.liveNode == nil then
|
||||
this.liveNode = PlayerLiveView:New(Util.GetTransform(root, "mapParent/selectMap/Image (1)/roleRoot"),1)
|
||||
this.liveNode:OnOpen(140,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
|
||||
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
|
||||
end
|
||||
this._BuildFlag = {}
|
||||
this._BuildFlagClick = {}
|
||||
|
|
|
@ -297,7 +297,7 @@ function this.LoadRole(u, v)
|
|||
this.NpcGO = nil
|
||||
end
|
||||
this.NpcGO = PlayerLiveView:New(Util.GetTransform(this.role, "root/ui/roleRoot"),1, nil)
|
||||
this.NpcGO:OnOpen(75)
|
||||
this.NpcGO:OnOpen(GetPlayerRoleSingleConFig().Scale2)
|
||||
this.NpcGO.name = "npc"
|
||||
this.roleCurPos = TileMapView.GetMapData():GetMapData(u, v)
|
||||
|
||||
|
@ -592,7 +592,8 @@ end
|
|||
|
||||
function this.PlayerIdle()
|
||||
this.bLeaderIsIdle = true
|
||||
if SkeletonGraphic and SkeletonGraphic.AnimationState then
|
||||
if this.NpcGO then
|
||||
-- if SkeletonGraphic and SkeletonGraphic.AnimationState then
|
||||
-- SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
|
||||
-- SkeletonGraphic.transform.localEulerAngles = Vector3.zero
|
||||
this.NpcGO:SetWalkDir(WALK_DIR.IDLE_FRONT)
|
||||
|
|
|
@ -1415,18 +1415,18 @@ function this.OnMainPlayerNPCRefresh()
|
|||
end
|
||||
function this:OnChangeTitleOrRideOrSkin()
|
||||
local curisRefreshMainPanelNpc = PlayerManager.GetisRefreshMainPanelNpc()
|
||||
LogBlue("sssssssssssssssssssssssssssssssssssss "..tostring(curisRefreshMainPanelNpc))
|
||||
-- LogBlue("sssssssssssssssssssssssssssssssssssss "..tostring(curisRefreshMainPanelNpc))
|
||||
if not curisRefreshMainPanelNpc then return end
|
||||
local btnClickMoveTran = this.btnClickMove:GetComponent("RectTransform")
|
||||
local rect = btnClickMoveTran.rect
|
||||
if self.playerView then
|
||||
for key, value in pairs(curNPCList) do
|
||||
if value == self.playerView then
|
||||
LogBlue("移除旧的 self.playerView")
|
||||
-- LogBlue("移除旧的 self.playerView")
|
||||
table.remove(curNPCList,key)
|
||||
end
|
||||
end
|
||||
LogBlue(":OnClose() :OnClose()")
|
||||
-- LogBlue(":OnClose() :OnClose()")
|
||||
if self.playerView.NpcGO then
|
||||
self.playerView.NpcGO:OnClose()
|
||||
end
|
||||
|
|
|
@ -24,6 +24,11 @@ function MainPlayerView.New(isSelf, root, rect, pos,_NpvData)
|
|||
Util.GetGameObject(instance.leader, "name/text2"):SetActive(false)
|
||||
_sex = NameManager.roleSex
|
||||
instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,1, nil)
|
||||
if PlayerManager.GetPlayerRide() > 0 then
|
||||
Util.GetGameObject(instance.leader, "name").transform.localPosition = Vector3.New(0,239.9,0)
|
||||
else
|
||||
Util.GetGameObject(instance.leader, "name").transform.localPosition = Vector3.New(0,176.1,0)
|
||||
end
|
||||
else
|
||||
instance.NameText = Util.GetGameObject(instance.leader, "name/text2"):GetComponent("Text")
|
||||
Util.GetGameObject(instance.leader, "name/text"):SetActive(false)
|
||||
|
@ -37,6 +42,11 @@ function MainPlayerView.New(isSelf, root, rect, pos,_NpvData)
|
|||
ride = _NpvData.userMount,
|
||||
designation = _NpvData.userTitle
|
||||
}
|
||||
if _NpvData.userMount > 0 then
|
||||
Util.GetGameObject(instance.leader, "name").transform.localPosition = Vector3.New(0,239.9,0)
|
||||
else
|
||||
Util.GetGameObject(instance.leader, "name").transform.localPosition = Vector3.New(0,176.1,0)
|
||||
end
|
||||
instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,2, PlayerLiveViewData)
|
||||
end
|
||||
-- instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,1, nil)
|
||||
|
|
|
@ -143,7 +143,7 @@ function this.InitRolePre(u, v)
|
|||
this.NpcGO:OnClose()
|
||||
end
|
||||
this.NpcGO = PlayerLiveView:New(Util.GetTransform(this.leader, "root/ui/roleRoot"),1)
|
||||
this.NpcGO:OnOpen(75,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
|
||||
this.NpcGO:OnOpen(GetPlayerRoleSingleConFig().Scale9,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
|
||||
end
|
||||
|
||||
function this.RefreshOption()
|
||||
|
|
|
@ -463,6 +463,7 @@ function this.SetPlayerMountTime(id,validTime)
|
|||
singData.mountId = id
|
||||
singData.overTime = validTime
|
||||
this.userMountList[singData.mountId] = singData
|
||||
this.SetPlayerRideRedPoint(PlayerTitleRideSkinRedPointTypeStr.Ride,0)
|
||||
end
|
||||
else--为空时是删除数据 倒计时结束时
|
||||
if this.userMountList[id] then
|
||||
|
@ -568,9 +569,13 @@ function this.CalculatePlayerDcorateProAddVal()
|
|||
end
|
||||
return addAllProVal
|
||||
end
|
||||
|
||||
function this.GetPlayerRideRedPoint()
|
||||
PlayerPrefs.GetString(PlayerManager.uid..PlayerManager.serverInfo.server_id.."PlayerRide", 0)
|
||||
function this.SetPlayerRideRedPoint(str,val)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid..PlayerManager.serverInfo.server_id..PlayerTitleRideSkinRedPointTypeStr.Ride, val)
|
||||
CheckRedPointStatus(RedPointType.Setting_Ride)
|
||||
end
|
||||
function this.GetPlayerRideRedPoint(str)
|
||||
local redPointState = PlayerPrefs.GetInt(PlayerManager.uid..PlayerManager.serverInfo.server_id..PlayerTitleRideSkinRedPointTypeStr.Ride, 0)
|
||||
return redPointState == 0
|
||||
end
|
||||
-----------------------------------玩家坐骑 皮肤 称号结束
|
||||
function this.GetHeroDataByStar(star,staticid)
|
||||
|
|
|
@ -207,6 +207,7 @@ function this.InitRedPointAllRelate()
|
|||
RPData:SetParent(RedPointType.Friend_Application, RedPointType.Friend)
|
||||
-- 设置界面红点
|
||||
RPData:SetParent(RedPointType.Setting_Head, RedPointType.Setting)
|
||||
RPData:SetParent(RedPointType.Setting_Ride, RedPointType.Setting)
|
||||
-- 头像界面红点
|
||||
RPData:SetParent(RedPointType.HeadChange_Frame, RedPointType.Setting_Head)
|
||||
RPData:SetParent(RedPointType.HeadChange_Head, RedPointType.Setting_Head)
|
||||
|
@ -371,6 +372,8 @@ function this.RegisterRedCheckFunc()
|
|||
-- 头像红点
|
||||
RPData:AddCheckFunc(RedPointType.HeadChange_Frame, HeadManager.CheckHeadRedPot)
|
||||
RPData:AddCheckFunc(RedPointType.HeadChange_Head, HeadManager.CheckHeadRedPot)
|
||||
--坐骑红点
|
||||
RPData:AddCheckFunc(RedPointType.Setting_Ride, PlayerManager.GetPlayerRideRedPoint)--,PlayerTitleRideSkinRedPointTypeStr.Ride
|
||||
--限时活动
|
||||
RPData:AddCheckFunc(RedPointType.Expert_FastExplore, ActivityGiftManager.ExpterActivityIsShowRedPoint)
|
||||
RPData:AddCheckFunc(RedPointType.Expert_AreaExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
|
||||
|
|
|
@ -422,8 +422,9 @@ function RewardItemPopup:SetItemShowMax(drop)
|
|||
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)
|
||||
-- isPopGetSSR = true
|
||||
-- UIManager.OpenPanel(UIName.DropGetPlayerDecorateShopPanel,curItemData.backData, func)
|
||||
func()
|
||||
else
|
||||
func()
|
||||
end
|
||||
|
|
|
@ -226,7 +226,7 @@ function this.SetHeadsInfo(data,root,index,name,level)
|
|||
designation = data.userTitle
|
||||
}
|
||||
npc = PlayerLiveView:New(this.livePrefab.transform,2, curPlayerLiveViewData)
|
||||
npc:OnOpen(20,Vector3.New(0,-118.65,0),WALK_DIR.IDLE_LEFT)
|
||||
npc:OnOpen(GetPlayerRoleSingleConFig().Scale6,Vector3.New(0,-118.65,0),WALK_DIR.IDLE_LEFT)
|
||||
|
||||
Util.AddOnceClick(this.firstheadClick,function()
|
||||
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid)
|
||||
|
|
|
@ -5,9 +5,9 @@ local funIndex = 1
|
|||
--Tab
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local _TabData={
|
||||
[1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "信息" },
|
||||
[1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "信息" , rpType = RedPointType.Setting_Head},
|
||||
-- [2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "称号" },
|
||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "坐骑" },
|
||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "坐骑" , rpType = RedPointType.Setting_Ride},
|
||||
-- [4] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "时装" },
|
||||
}
|
||||
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
||||
|
@ -41,6 +41,7 @@ function SettingPanel:InitComponent()
|
|||
for i = 1, #this.contents do
|
||||
this.contents[i].view:InitComponent(Util.GetGameObject(this.transform, "layout/"..this.contents[i].panelName),self)
|
||||
end
|
||||
this.tabBox = Util.GetGameObject(this.transform, "TabBox")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -52,6 +53,22 @@ function SettingPanel:BindEvent()
|
|||
for i = 1, #this.contents do
|
||||
this.contents[i].view:BindEvent()
|
||||
end
|
||||
|
||||
this.TabCtrl = TabBox.New()
|
||||
this.TabCtrl:SetTabAdapter(this.TabAdapter)
|
||||
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
|
||||
this.TabCtrl:Init(this.tabBox, _TabData,funIndex)
|
||||
-- 绑定红点
|
||||
local tabList = this.TabCtrl:GetTabList()
|
||||
for index = 1, #tabList do
|
||||
local tab = tabList[index]
|
||||
local redpot = Util.GetGameObject(tab, "Redpot")
|
||||
if _TabData[index].rpType then
|
||||
BindRedPointObject(_TabData[index].rpType, redpot)
|
||||
else
|
||||
redpot:SetActive(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
@ -75,11 +92,7 @@ end
|
|||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function SettingPanel:OnShow()
|
||||
this.tabBox = Util.GetGameObject(this.transform, "TabBox")
|
||||
this.TabCtrl = TabBox.New()
|
||||
this.TabCtrl:SetTabAdapter(this.TabAdapter)
|
||||
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
|
||||
this.TabCtrl:Init(this.tabBox, _TabData,funIndex)
|
||||
|
||||
end
|
||||
|
||||
-- tab节点显示自定义
|
||||
|
@ -126,6 +139,12 @@ function SettingPanel:OnDestroy()
|
|||
for i = 1, #this.contents do
|
||||
this.contents[i].view:OnDestroy()
|
||||
end
|
||||
-- 清除红点绑定
|
||||
for _, v in ipairs(_TabData) do
|
||||
if v.rpType then
|
||||
ClearRedPointObject(v.rpType)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return SettingPanel
|
|
@ -5,6 +5,7 @@ local live2dRoot
|
|||
local live2dRoot2
|
||||
local curPlayerHeadIconConfig
|
||||
local curItemConfig
|
||||
local curUserRideConFig
|
||||
function SettingPlayerRide:ctor(mainPanel, gameObject)
|
||||
self.mainPanel = mainPanel
|
||||
self.gameObject = gameObject
|
||||
|
@ -24,6 +25,7 @@ function SettingPlayerRide:InitComponent(gameObject)
|
|||
this.goToBtnText = Util.GetGameObject(gameObject, "goToBtn/Text"):GetComponent("Text")
|
||||
this.stateImg = Util.GetGameObject(gameObject, "stateImg"):GetComponent("Image")
|
||||
this.lefeTime = Util.GetGameObject(gameObject, "lefeTime"):GetComponent("Text")
|
||||
this.setImage = Util.GetGameObject(gameObject, "setImage")
|
||||
|
||||
this.itemPre = Util.GetGameObject(gameObject, "itemPre")
|
||||
this.itemGrid = Util.GetGameObject(gameObject, "rect/grid")
|
||||
|
@ -68,6 +70,7 @@ end
|
|||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function SettingPlayerRide:OnShow()
|
||||
PlayerManager.SetPlayerRideRedPoint(PlayerTitleRideSkinRedPointTypeStr.Ride,1)
|
||||
this.ShowPanelData()
|
||||
end
|
||||
--显示信息
|
||||
|
@ -76,16 +79,13 @@ function this.ShowPanelData()
|
|||
local rideList = ConfigManager.GetAllConfigsDataByKey(ConfigName.PlayerHeadIcon,"Type",PlayerHeadIconType.Ride)
|
||||
--设置滚动区信息
|
||||
curUserRideId = PlayerManager.GetPlayerRide()
|
||||
local curUserRideConFig
|
||||
curUserRideConFig = rideList[1]
|
||||
this.scrollView:SetData(rideList,function(index,root)
|
||||
if curUserRideId <= 0 and index == 1 then
|
||||
curUserRideConFig = rideList[index]
|
||||
end
|
||||
this.ShowRideInfo(root,rideList[index])
|
||||
end, not false, not false)
|
||||
if curUserRideId > 0 then
|
||||
local data = ConfigManager.GetConfigData(ConfigName.PlayerHeadIcon,curUserRideId)
|
||||
this.SingleRideClickShowInfo(data)
|
||||
curUserRideConFig = ConfigManager.GetConfigData(ConfigName.PlayerHeadIcon,curUserRideId)
|
||||
this.SingleRideClickShowInfo(curUserRideConFig)
|
||||
else
|
||||
this.SingleRideClickShowInfo(curUserRideConFig)
|
||||
end
|
||||
|
@ -100,8 +100,13 @@ function this.ShowRideInfo(go,data)
|
|||
Util.GetGameObject(go, "GetImage/GetImage/Text"):GetComponent("Text").text = "使用中"
|
||||
local noGetImage = Util.GetGameObject(go, "noGetImage")
|
||||
local GetImage = Util.GetGameObject(go, "GetImage")
|
||||
local setImage = Util.GetGameObject(go, "GetImage")
|
||||
setImage:SetActive(false)
|
||||
this.setImage:SetActive(false)
|
||||
if PlayerHeadIconConfig.Id == curUserRideConFig.Id then
|
||||
this.setImage:SetActive(true)
|
||||
this.setImage.transform:SetParent(go.transform)
|
||||
this.setImage.transform.localPosition = Vector3.zero
|
||||
this.setImage.transform.localScale = Vector3.one
|
||||
end
|
||||
local isGet = false
|
||||
if PlayerManager.userMountList[PlayerHeadIconConfig.Id] then
|
||||
isGet = true
|
||||
|
@ -113,12 +118,18 @@ function this.ShowRideInfo(go,data)
|
|||
noGetImage:SetActive(not isGet)
|
||||
GetImage:SetActive(isUser)
|
||||
Util.AddOnceClick(go, function()
|
||||
this.SingleRideClickShowInfo(data)
|
||||
this.SingleRideClickShowInfo(data,go)
|
||||
end)
|
||||
|
||||
end
|
||||
function this.SingleRideClickShowInfo(data)
|
||||
function this.SingleRideClickShowInfo(data,go)
|
||||
curPlayerHeadIconConfig = data
|
||||
if go then
|
||||
this.setImage:SetActive(true)
|
||||
this.setImage.transform:SetParent(go.transform)
|
||||
this.setImage.transform.localPosition = Vector3.zero
|
||||
this.setImage.transform.localScale = Vector3.one
|
||||
end
|
||||
local isGet,isUser = PlayerManager.userMountList[curPlayerHeadIconConfig.Id],curUserRideId == curPlayerHeadIconConfig.Id
|
||||
curItemConfig = ConfigManager.GetConfigData(ConfigName.ItemConfig,curPlayerHeadIconConfig.ItemId)
|
||||
local rideData = PlayerManager.userMountList[curPlayerHeadIconConfig.Id]
|
||||
|
@ -150,12 +161,12 @@ function this.SingleRideClickShowInfo(data)
|
|||
ride = curPlayerHeadIconConfig.Id,
|
||||
}
|
||||
live2dRoot = PlayerLiveView:New(this.live2dRootParent,2, curPlayerLiveViewData)
|
||||
live2dRoot:OnOpen(15,nil,WALK_DIR.IDLE_LEFT)
|
||||
live2dRoot:OnOpen(GetPlayerRoleSingleConFig().Scale7,nil,WALK_DIR.IDLE_LEFT)
|
||||
local ridePlayerLiveViewData = {
|
||||
ride = curPlayerHeadIconConfig.Id,
|
||||
}
|
||||
live2dRoot2 = PlayerLiveView:New(this.live2dRootParent2,2, ridePlayerLiveViewData)
|
||||
live2dRoot2:OnOpen(50,nil,WALK_DIR.IDLE_LEFT)
|
||||
live2dRoot2:OnOpen(GetPlayerRoleSingleConFig().Scale8,nil,WALK_DIR.IDLE_LEFT)
|
||||
|
||||
Util.AddOnceClick(this.goToBtn, function()
|
||||
if not isGet and not isUser then
|
||||
|
|
|
@ -52,6 +52,12 @@ function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer)
|
|||
instance.playerLiveSkeletonGraphic = nil
|
||||
instance.titleLiveSkeletonGraphic = nil
|
||||
|
||||
|
||||
instance.oldPlayerDirAnimation = nil
|
||||
instance.oldPlayerDiry = nil
|
||||
instance.oldRideDirAnimation = nil
|
||||
instance.oldRideDiry = nil
|
||||
|
||||
setmetatable(instance, { __index = PlayerLiveView })
|
||||
return instance
|
||||
end
|
||||
|
@ -232,45 +238,39 @@ function PlayerLiveView:SetWalkDir(dir)
|
|||
end
|
||||
self:SetSiblingIndexPlayerOrRide(1)
|
||||
elseif dir == WALK_DIR.JINGYA then-- 惊讶
|
||||
-- if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
|
||||
-- PlayerLiveView:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
|
||||
-- else
|
||||
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
|
||||
-- self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
|
||||
else
|
||||
self:SetWalkDirInfo(PLAYER_WALK_DIR.JINGYA)
|
||||
-- end
|
||||
end
|
||||
elseif dir == WALK_DIR.LAUCH then-- 发射
|
||||
-- if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
|
||||
-- PlayerLiveView:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
|
||||
-- else
|
||||
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
|
||||
-- self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
|
||||
else
|
||||
self:SetWalkDirInfo(PLAYER_WALK_DIR.LAUCH)
|
||||
-- end
|
||||
end
|
||||
elseif dir == WALK_DIR.TOUCH then-- 轻按
|
||||
-- if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
|
||||
-- PlayerLiveView:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
|
||||
-- else
|
||||
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
|
||||
-- self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
|
||||
else
|
||||
self:SetWalkDirInfo(PLAYER_WALK_DIR.TOUCH)
|
||||
-- end
|
||||
end
|
||||
end
|
||||
end
|
||||
function PlayerLiveView:SetWalkDirInfo(playerDir,RideDir)
|
||||
if playerDir and not RideDir then
|
||||
-- LogBlue("PlayerLiveView playerDir : "..playerDir.animation .." ".. playerDir.y)
|
||||
if playerDir and (self.oldPlayerDirAnimation ~= playerDir.animation or self.oldPlayerDiry ~= playerDir.y) then
|
||||
LogBlue("PlayerLiveView playerDir : "..playerDir.animation .." ".. playerDir.y)
|
||||
self.playerLiveSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, playerDir.y, 0)
|
||||
self.playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, playerDir.animation, true)
|
||||
elseif not playerDir and RideDir then
|
||||
-- LogBlue("PlayerLiveView playerDir : "..RideDir.animation .." ".. RideDir.y)
|
||||
self.rideLivSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, RideDir.y, 0)
|
||||
self.rideLivSkeletonGraphic.AnimationState:SetAnimation(0, RideDir.animation, true)
|
||||
elseif playerDir and RideDir then
|
||||
-- LogBlue("PlayerLiveView playerDir : "..playerDir.animation .." ".. playerDir.y.." RideDir : "..RideDir.animation .." ".. RideDir.y)
|
||||
self.playerLiveSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, playerDir.y, 0)
|
||||
self.playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, playerDir.animation, true)
|
||||
self.rideLivSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, RideDir.y, 0)
|
||||
self.rideLivSkeletonGraphic.AnimationState:SetAnimation(0, RideDir.animation, true)
|
||||
self.oldPlayerDirAnimation = playerDir.animation
|
||||
self.oldPlayerDiry = playerDir.y
|
||||
end
|
||||
if RideDir then
|
||||
|
||||
else
|
||||
|
||||
if RideDir and (self.oldRideDirAnimation ~= RideDir.animation or self.oldRideDiry ~= RideDir.y) then
|
||||
LogBlue("PlayerLiveView RideDir : "..RideDir.animation .." ".. RideDir.y)
|
||||
self.rideLivSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, RideDir.y, 0)
|
||||
self.rideLivSkeletonGraphic.AnimationState:SetAnimation(0, RideDir.animation, true)
|
||||
self.oldRideDirAnimation = RideDir.animation
|
||||
self.oldRideDiry = RideDir.y
|
||||
end
|
||||
end
|
||||
function PlayerLiveView:SetSiblingIndexPlayerOrRide(type)
|
||||
|
|
Loading…
Reference in New Issue