探索地图修改提交
parent
4318b37891
commit
89c298f593
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -0,0 +1,110 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 19f184c33d6b1fe43883dc621e36613f
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 65
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 56
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 95f2c3b899b033b4a97fe8bf11b65988
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag: ExploreAtlas
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
|
@ -0,0 +1,110 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a95128062a937f247a253382f4c95cc9
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 65
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 56
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: b506802d241efc5449f438d3d446def3
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag: ExploreAtlas
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1,110 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9d763b426b1b70b40aedd4a1c8a181b4
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 65
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 56
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: a345aaf4da418b347ad9ab062c75c817
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag: ExploreAtlas
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
|
@ -0,0 +1,110 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e5308f0e08ecd9b4d8a38310c189e3bb
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 65
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 56
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: a306cdb683565e948a32fa20596f6a72
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag: ExploreAtlas
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -219,7 +219,7 @@ function ExploreMainPanel:SetMapState()
|
|||
end
|
||||
local s = function()
|
||||
for k,v in pairs(self.mapList) do
|
||||
if v.data.state > 0 then
|
||||
if LengthOfTable(v.data.formations) > 0 then
|
||||
v.exploreIma.gameObject:SetActive(true)
|
||||
local index = 0
|
||||
for i = 1,#self.mapList[k].exploreList do
|
||||
|
|
|
@ -77,6 +77,7 @@ end
|
|||
|
||||
--刷新编队
|
||||
function this.UpdateFormationData(team)
|
||||
LogGreen("team.teamId:"..team.teamId.." team.hp:"..team.hp)
|
||||
if this.FormationData[team.teamId] then
|
||||
this.FormationData[team.teamId].hp = team.hp
|
||||
this.FormationData[team.teamId].exploreTime = team.exploreTime
|
||||
|
@ -101,6 +102,7 @@ function this.UpdateFormationData(team)
|
|||
this.UpdateMapFormationData(team.mapId,team.teamId,1)
|
||||
end
|
||||
end
|
||||
LogGreen("this.FormationData[team.teamId].hp:"..this.FormationData[team.teamId].hp)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Explore.UpdateSingleFormation,team.teamId)
|
||||
else
|
||||
LogGreen(string.format("%s编队不属于探索玩法",team.teamId))
|
||||
|
|
|
@ -26,6 +26,7 @@ end
|
|||
--添加事件监听(用于子类重写)
|
||||
function ExplorePanel:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Explore.UpdateFormation,this.OnShow)
|
||||
fightMap:AddListener()
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
|
|
|
@ -82,11 +82,39 @@ function this:InitComponent(root, parent)
|
|||
end
|
||||
|
||||
function this:AddListener()
|
||||
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Explore.UpdateSingleFormation,this.Refresh)
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Explore.UpdateSingleFormation,this.Refresh)
|
||||
end
|
||||
|
||||
function this.Refresh(teamId)
|
||||
LogGreen("teamId:"..teamId)
|
||||
this.playerViews[teamId]:RefreshHp()
|
||||
if ExploreManager.FormationData[teamId].state < 1 then
|
||||
SubUIManager.Close(this.playerViews[this.playerViews[teamId].formationId])
|
||||
if this.playerViews[0].formationId == teamId then
|
||||
this.playerViews[0] = nil
|
||||
this.playerViews[this.playerViews[0].formationId] = nil
|
||||
end
|
||||
end
|
||||
if not this.playerViews[0] then
|
||||
for k,v in pairs(this.playerViews) do
|
||||
if v.formationId > 3100 then
|
||||
this.playerViews[0] = v
|
||||
if not this.playerViews[0] then
|
||||
this.playerViews[v.formationId]:RefreshIsSelf(true)
|
||||
this.playerViews[0] = this.playerViews[v.formationId]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- 设置相机初始化位置
|
||||
local v4 = this.playerViews[0].transform.localPosition
|
||||
v4.z = -50
|
||||
TileMapView.SetCameraPos(v4)
|
||||
end
|
||||
|
||||
function this:Init()
|
||||
|
@ -95,7 +123,6 @@ function this:Init()
|
|||
-- 初始化加载地图块数据
|
||||
this:LoadMapData()
|
||||
-- 加载一个小人
|
||||
local tempconfig = ConfigManager.GetConfigData(ConfigName.ChallengeMapConfig,m_parent.mapData.exploreMapId)
|
||||
NetManager.ExplorerMapPlayerInfoRequest(m_parent.mapData.mapId,function(msg)
|
||||
local NPCList = ExploreManager.InitMapUserInfosData(msg,m_parent.mapData.mapId)
|
||||
local area = monsterArea[m_parent.mapData.exploreMapId]
|
||||
|
@ -109,14 +136,17 @@ function this:Init()
|
|||
|
||||
if v.formationId > 3100 then
|
||||
if not this.playerViews[0] then
|
||||
this.playerViews[v.formationId]:SetData((index3 == 1 and index1 or index2),index4,true,v)
|
||||
this.playerViews[v.formationId]:RefreshIsSelf(true)
|
||||
this.playerViews[0] = this.playerViews[v.formationId]
|
||||
else
|
||||
this.playerViews[v.formationId]:SetData((index3 == 1 and index1 or index2),index4,false,v)
|
||||
this.playerViews[v.formationId]:RefreshIsSelf(false)
|
||||
end
|
||||
else
|
||||
this.playerViews[v.formationId]:SetData((index3 == 1 and index1 or index2),index4,false,v)
|
||||
this.playerViews[v.formationId]:RefreshIsSelf(false)
|
||||
end
|
||||
this.playerViews[v.formationId]:SetData((index3 == 1 and index1 or index2),index4,v)
|
||||
this.playerViews[v.formationId]:RefreshHp(v.formationId)
|
||||
this.playerViews[v.formationId]:Run()
|
||||
end
|
||||
-- 设置相机初始化位置
|
||||
local v4 = this.playerViews[0].transform.localPosition
|
||||
|
@ -124,7 +154,7 @@ function this:Init()
|
|||
TileMapView.SetCameraPos(v4)
|
||||
-- 初始化两个地图标志
|
||||
this.LoadMapIcon()
|
||||
this.SetPlayerViewWalk()
|
||||
--this.SetPlayerViewWalk()
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -442,6 +472,7 @@ function this.OnGameOver()
|
|||
end
|
||||
|
||||
function this:OnClose()
|
||||
this:RemoveListener()
|
||||
-- Log("关闭挂机:OnClose")
|
||||
if this.startTimer then
|
||||
this.startTimer:Stop()
|
||||
|
|
|
@ -1090,6 +1090,7 @@ function this.ExplorerMapIndicationResponse(buffer)
|
|||
local data = buffer:DataByte()
|
||||
local msg = PlayerInfoProto_pb.ExplorerMapIndicationResponse()
|
||||
msg:ParseFromString(data)
|
||||
LogGreen("收到了刷新探索编队的indication")
|
||||
ExploreManager.UpdateFormationData(msg.exploreInfo)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Explore.UpdateFormation)
|
||||
end
|
||||
|
|
|
@ -136,14 +136,18 @@ function SingleExplorePlayerView:OnOpen(parent)
|
|||
|
||||
end
|
||||
|
||||
function SingleExplorePlayerView:SetData(u,v,isSelf,data)
|
||||
self.data = data
|
||||
self.isclose = false
|
||||
self._PlayTimeStamp = 0
|
||||
function SingleExplorePlayerView:RefreshIsSelf(isSelf)
|
||||
if isSelf then
|
||||
self.ui:GetComponent("Canvas").worldCamera = TileMapView.GetCamera()
|
||||
end
|
||||
self.isSelf = isSelf
|
||||
end
|
||||
|
||||
function SingleExplorePlayerView:SetData(u,v,data)
|
||||
sortingorder = self.parent.GetCurLayer()
|
||||
self.data = data
|
||||
self.isclose = false
|
||||
self._PlayTimeStamp = 0
|
||||
|
||||
local v3 = TileMapView.GetLiveTilePos(u, v)
|
||||
self.gameObject.transform.localPosition = Vector3(v3.x, v3.y, v3.z - 10)
|
||||
|
@ -167,16 +171,6 @@ function SingleExplorePlayerView:SetData(u,v,isSelf,data)
|
|||
-- self.PracticeIcon:SetActive(true)
|
||||
-- PracticeManager.SetPracticeIcon(self.PracticeIcon,PracticeManager.PracticeLevel or 1)
|
||||
-- end
|
||||
self.blood:SetActive(true)
|
||||
local hp = ExploreManager.GetHpById(data.formationId)
|
||||
if hp <= 0 then
|
||||
self.tip.gameObject:SetActive(true)
|
||||
self.bloodSlider.gameObject:SetActive(false)
|
||||
else
|
||||
self.bloodSlider.fillAmount = hp/FormationManager.GetFormationPower(data.formationId)
|
||||
self.bloodSlider.gameObject:SetActive(true)
|
||||
self.tip.gameObject:SetActive(false)
|
||||
end
|
||||
else
|
||||
npc = data.sex == ROLE_SEX.BOY and npc1 or npc2
|
||||
scale = data.sex == ROLE_SEX.BOY and 1 or 0.5
|
||||
|
@ -201,11 +195,11 @@ function SingleExplorePlayerView:SetData(u,v,isSelf,data)
|
|||
-- self.PracticeIcon:SetActive(true)
|
||||
-- PracticeManager.SetPracticeIcon(self.PracticeIcon,data.practiceLevel)
|
||||
-- end
|
||||
self.blood:SetActive(false)
|
||||
end
|
||||
|
||||
self.playerLiveView:OnOpen(GetPlayerRoleSingleConFig().Scale2)
|
||||
self.playerLiveView:OnSortingOrderChange(sortingorder)
|
||||
if isSelf then
|
||||
if self.isSelf then
|
||||
self.playerLiveView:SetSelfTag()
|
||||
self.playerLiveView:SetEffectScale(2)
|
||||
end
|
||||
|
@ -216,27 +210,62 @@ function SingleExplorePlayerView:SetData(u,v,isSelf,data)
|
|||
-- LogWarn(self.roleCurPos.u.."||"..self.roleCurPos.v)
|
||||
|
||||
self.bLeaderIsIdle = true
|
||||
self:SetWalkDir(WALK_DIR.LAUCH)
|
||||
|
||||
self:HideSomeTrash()
|
||||
self:OnSortingOrderChange(self.parent.GetCurLayer())
|
||||
self:OnSortingOrderChange(sortingorder)
|
||||
|
||||
--当前状态
|
||||
self.state = 0
|
||||
self.activeState = 0
|
||||
PlayUIAnim(self.gameObject)
|
||||
end
|
||||
|
||||
function SingleExplorePlayerView:OnSortingOrderChange(orginLayer)
|
||||
Util.AddParticleSortLayer(self.hitEffect, orginLayer - sortingorder)
|
||||
if #self.hurtNum > 0 then -- 初始化完成
|
||||
for i = 1, 3 do
|
||||
Util.GetGameObject(self.hurtNum[i], "anim"):GetComponent("Canvas").sortingOrder = orginLayer - sortingorder
|
||||
end
|
||||
end
|
||||
sortingorder = orginLayer
|
||||
end
|
||||
|
||||
function SingleExplorePlayerView:HideSomeTrash()
|
||||
for i = 1, 3 do
|
||||
self.buffTipList[i]:SetActive(false)
|
||||
end
|
||||
end
|
||||
|
||||
function SingleExplorePlayerView:Run()
|
||||
self:SetWalkDir(WALK_DIR.LAUCH)
|
||||
end
|
||||
|
||||
function SingleExplorePlayerView:RefreshHp()
|
||||
if self.data.formationId > 3100 then
|
||||
self.blood:SetActive(true)
|
||||
local hp = ExploreManager.GetHpById(self.data.formationId)
|
||||
if hp <= 0 then
|
||||
if hp <= 0 then
|
||||
self.tip.gameObject:SetActive(true)
|
||||
self.bloodSlider.gameObject:SetActive(false)
|
||||
if self.activeState == 1 then
|
||||
self.activeState = 0
|
||||
self:RoleWalkEnd(nil)
|
||||
end
|
||||
self.activeState = 0
|
||||
else
|
||||
self.bloodSlider.fillAmount = hp/FormationManager.GetFormationPower(self.data.formationId)
|
||||
self.bloodSlider.gameObject:SetActive(true)
|
||||
self.tip.gameObject:SetActive(false)
|
||||
if self.activeState == 0 then
|
||||
self.activeState = 1
|
||||
self:RoleWalkEnd(nil)
|
||||
end
|
||||
self.activeState = 1
|
||||
end
|
||||
else
|
||||
self.activeState = 1
|
||||
self.blood:SetActive(false)
|
||||
self:RoleWalkEnd(nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -250,22 +279,6 @@ function SingleExplorePlayerView:SetBattleState(state)
|
|||
self.buffEffectRoot.gameObject:SetActive(state)
|
||||
end
|
||||
|
||||
function SingleExplorePlayerView:HideSomeTrash()
|
||||
for i = 1, 3 do
|
||||
self.buffTipList[i]:SetActive(false)
|
||||
end
|
||||
end
|
||||
|
||||
function SingleExplorePlayerView:OnSortingOrderChange(orginLayer)
|
||||
Util.AddParticleSortLayer(self.hitEffect, orginLayer - sortingorder)
|
||||
if #self.hurtNum > 0 then -- 初始化完成
|
||||
for i = 1, 3 do
|
||||
Util.GetGameObject(self.hurtNum[i], "anim"):GetComponent("Canvas").sortingOrder = orginLayer - sortingorder
|
||||
end
|
||||
end
|
||||
sortingorder = orginLayer
|
||||
end
|
||||
|
||||
-- 撞击事件结束后的回调
|
||||
function SingleExplorePlayerView:hitCallBack(pos)
|
||||
self:SetWalkDir(WALK_DIR.IDLE_FRONT)
|
||||
|
@ -288,6 +301,10 @@ end
|
|||
|
||||
-- 随机一个位置给大爷走走
|
||||
function SingleExplorePlayerView:SetRoleHitTarget()
|
||||
LogGreen("self.activeState:"..self.activeState)
|
||||
if self.activeState == 0 then
|
||||
return
|
||||
end
|
||||
if self.thread then
|
||||
coroutine.stop(self.thread)
|
||||
self.thread=nil
|
||||
|
|
Loading…
Reference in New Issue