逍遥游资源预设脚本提交

yuanshuai 2020-10-15 10:53:00 +08:00
parent ba75aab424
commit 8487c445a3
21 changed files with 807 additions and 82 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c47763cf7c7b4ef4b952ecaee7d32e71
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 19532ffb20adbf04fb84c4297dc79256
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 KiB

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 3b9a93390914b7145b5fc4f3f8eb3db0
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: 58
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: d49a4484efec38e448f96c3fa4946ff1
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 KiB

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: ed804fcb941c1d545ba392fa3b130da4
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: 58
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 8f0fb96a5dcbdf84bbb54e6be7908981
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 KiB

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 0122ccbfc23ef984d9a8c8c70aa83103
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: 58
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 9b9f380030e288f469d94e82fdcfb008
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dbc617ea06fae504ab25f7d7dff16c43
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 KiB

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 1039ce6aba0102f4ea632f8b4dbca939
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: 58
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: c34b89d7e08a52a44b58be437669f3ab
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 KiB

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: dfd4eeddc4117064ca05e01f0e3d0d17
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: 58
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 0ab36dc8b783fdb4abf2ab0a2b20473b
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 KiB

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 41ff9794edff7ca44a39dd892705dd1f
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: 58
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: c0bd5907104f51d41b8335586d6a46ac
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -18,7 +18,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &8364267904490108043
RectTransform:
m_ObjectHideFlags: 0
@ -136,7 +136,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &636454027232682164
RectTransform:
m_ObjectHideFlags: 0
@ -1279,7 +1279,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &8966431775991199415
RectTransform:
m_ObjectHideFlags: 0
@ -1808,7 +1808,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &7422376557506794684
RectTransform:
m_ObjectHideFlags: 0

View File

@ -403,5 +403,8 @@ GameEvent = {
},
DynamicTask={
OnMissionChange = "DynamicTask.MissionChange",
},
XiaoYao={
StartXiaoYao="XiaoYao.StartXiaoYao",--执行逍遥游跑图
}
}

View File

@ -608,7 +608,7 @@ function this.EquipWearRequest(_heroId, _equipIds,_type, func)
end)
end
--请求脱装备
function this.EquipUnLoadOptRequest(_heroId, _equipIds, _type, func)
function this.EquipUnLoadOptRequest(_heroId, _equipIds, _type,func)
local data = HeroInfoProto_pb.EquipUnLoadOptRequest()
data.heroId = _heroId
data.type = _type
@ -3392,7 +3392,7 @@ function this.FindTreasureRefreshRequest(func)
end)
end
----===================巅峰赛相关+++++++++++++++++++++++
--- 获基础数据
--- 获<EFBFBD><EFBFBD>基础数据
function NetManager.GetTopMatchBaseInfo(func)
Network:SendMessageWithCallBack(MessageTypeProto_pb.CHAMPION_GET_REQUEST, MessageTypeProto_pb.CHAMPION_GET_RESPONSE, nil, function(buffer)
local data = buffer:DataByte()
@ -4504,11 +4504,11 @@ function this.JourneyGetOneInfoResponse(mapId,func)
end)
end
--获取逍遥游地图列表数据
--摇骰子请求
function this.JourneyDoResponse(func)
Network:SendMessageWithCallBack(MessageTypeProto_pb.JOURNEY_DO_REQUEST, MessageTypeProto_pb.JOURNEY_DO_RESPONSE, msg, function(buffer)
local data = buffer:DataByte()
local msg = MapInfoProto_pb.JourneyGetInfoResponse()
local msg = MapInfoProto_pb.JourneyDoResponse()
msg:ParseFromString(data)
if func then
func(msg)

View File

@ -23,12 +23,7 @@ function this.OpenXiaoYaoMap(mapId)
this.curMapId=mapId
this.curMapData=msg
Log("格子数量:"..#this.curMapData.cell)
for i = 1, #this.curMapData.cell do
Log("index:"..this.curMapData.cell[i].cellIndex)
-- body
end
local grids=this.curMapData.cell
if grids~=nil then
if this.curMapData.cell~=nil then
table.sort(this.curMapData.cell,function(a,b)
return a.cellIndex < b.cellIndex
end)
@ -41,10 +36,12 @@ end
--掷骰子请求
function this.StartXiaoYao()
NetManager.JourneyDoResponse(function (msg)
NetManager.JourneyDoResponse(function (msg)
for i = 1, #msg.pointes do
this.curMapData.location=this.curMapData.location+msg.pointes[i]
Log("骰子点数:"..msg.pointes[i])
this.curMapData.location=this.curMapData.location+msg.pointes[i]
end
Game.GlobalEvent:DispatchEvent(GameEvent.XiaoYao.StartXiaoYao, msg)
end)
end

View File

@ -3,23 +3,21 @@ XiaoYaoMapPanel = Inherit(BasePanel)
local this = XiaoYaoMapPanel
local cursortingOrder
local curGridIndex=1
local allGridData={
-- {x=100,y=-100},{x=200,y=-100},{x=300,y=-100},
-- {x=400,y=-100},{x=400,y=-200,event=11},{x=400,y=-300}, {x=400,y=-400},{x=400,y=-500},{x=400,y=-600},
-- {x=400,y=-700},{x=400,y=-800},{x=400,y=-900}, {x=400,y=-1000},{x=400,y=-1100},{x=400,y=-1200},
-- {x=500,y=-1200},{x=600,y=-1200},{x=700,y=-1200},{x=800,y=-1200,event=11},{x=900,y=-1200},{x=1000,y=-1200},
-- {x=1100,y=-1200},{x=1200,y=-1200},{x=1300,y=-1200},{x=1400,y=-1200},{x=1500,y=-1200},{x=1600,y=-1200},
-- {x=1600,y=-1100},{x=1600,y=-1000},{x=1600,y=-900,event=11},{x=1700,y=-900},{x=1800,y=-900},{x=1900,y=-900},
-- {x=2000,y=-900},{x=2100,y=-900},{x=2200,y=-900},{x=2300,y=-900},{x=2400,y=-900},{x=2500,y=-900},{x=2600,y=-900},
-- {x=2700,y=-900},{x=2800,y=-900},{x=2800,y=-800},{x=2800,y=-700,event=7},{x=2900,y=-700},{x=3000,y=-700},{x=3100,y=-700}
}
local allGridData={}
local isAuto=false
--初始化组件(用于子类重写)
function this:InitComponent()
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
this.mapName=Util.GetGameObject(self.gameObject,"mapTitle/mapName"):GetComponent("Text")
this.mapProcess=Util.GetGameObject(self.gameObject,"mapTitle/mapProcess"):GetComponent("Text")
this.btnBack = Util.GetGameObject(self.gameObject, "btnBack")
this.shopBtn = Util.GetGameObject(self.gameObject, "shopBtn")
this.rouleBtn = Util.GetGameObject(self.gameObject, "rouleBtn")
this.bossBtn = Util.GetGameObject(self.gameObject, "bossBtn")
this.previewBtn=Util.GetGameObject(self.gameObject, "previewBtn")
this.autoBtn=Util.GetGameObject(self.gameObject, "auto")--自动游历按钮
this.toggle=Util.GetGameObject(self.gameObject, "auto/toggle")--自动游历开关显示
this.mapParent=Util.GetGameObject(self.gameObject,"mapParent")
this.gridParent=Util.GetGameObject(self.gameObject,"mapParent/gridParent")
this.grid=Util.GetGameObject(self.gameObject,"prefab/grid")
@ -32,12 +30,15 @@ end
--绑定事件(用于子类重写)
function this:BindEvent()
Util.AddClick(this.btnBack, function ()
PlayerManager.carbonType = 1
UIManager.OpenPanel(UIName.XiaoYaoYouPanel)
Util.AddClick(this.btnBack, function ()
XiaoYaoManager.OpenMapList()
self:ClosePanel()
end)
--商店点击
Util.AddClick(this.shopBtn, function ()
end)
--转盘点击
Util.AddClick(this.rouleBtn, function ()
local grids={{index=3,gName="ccc"},{index=5,gName="eee"},{index=2,gName="bbb"},{index=4,gName="ddd"}}
table.sort(grids,function(a,b)
@ -47,9 +48,25 @@ function this:BindEvent()
Log(grids[i].gName)
end
end)
--boss点击事件
Util.AddClick(this.bossBtn, function ()
end)
--奖励预览
Util.AddClick(this.previewBtn, function ()
end)
--自动游历点击
Util.AddClick(this.autoBtn, function ()
if isAuto then
isAuto=false
this.toggle.gameObject:SetActive(false)
else
isAuto=true
this.toggle.gameObject:SetActive(true)
end
end)
Util.AddClick(this.startBtn,function()
@ -61,70 +78,92 @@ function this:BindEvent()
end)
return
end
local num=math.random(6)
this.startBtnText.text=num
local targetIndex=curGridIndex+num
if targetIndex>#allGridData then
targetIndex=#allGridData
end
this.turnEffect:Reset(function()
curGridIndex=curGridIndex+1
this.TT.transform:DOAnchorPos(Vector3(allGridData[curGridIndex].x,allGridData[curGridIndex].y,0),0.3)
this.MapMove(allGridData[curGridIndex].x,0.3)
if curGridIndex==targetIndex then--如果停到对应位置
this.turnEffect:Stop()--暂停
if allGridData[curGridIndex].event~=nil then
local pos=2054
NetManager.MapUpdateEvent(pos, function (eventId)
-- 试炼召唤Boss需要向服务器同步一次发送-1000 此时不赋值
if pos ~= -1000 then
MapManager.curTriggerPos = pos
end
LogGreen(tostring(pos))
LogYellow(tostring(#MapManager.mapPointList))
MapManager.mapPointId = MapManager.mapPointList[pos]
LogPink(tostring(MapManager.mapPointId))
Log(Language[11196] .. eventId)
if eventId~=0 then
MissionManager.EventPointTrigger(eventId)
elseif eventId == 0 and MapManager.curCarbonType == CarBonTypeId.TRIAL then
-- body
local style = MapPointConfig[MapManager.mapPointId].Style
MissionManager.MapPointTrigger(style)
end
end)
--MissionManager.EventPointTrigger(allGridData[curGridIndex].event)
end
end
end,0.3,-1,true)
this.turnEffect:Start()
XiaoYaoManager.StartXiaoYao()
end)
end
--添加事件监听(用于子类重写)
function this:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.XiaoYao.StartXiaoYao, this.RunMap)
end
--移除事件监听(用于子类重写)
function this:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.XiaoYao.StartXiaoYao, this.RunMap)
end
function this.RunMap(_data)
Log("开始跑图")
local targetIndex=0
for i = 1, #_data.pointes do
this.startBtnText.text=_data.pointes[i]
targetIndex=targetIndex+_data.pointes[i]
end
targetIndex=targetIndex+curGridIndex
Log("目标格子索引:"..targetIndex)
if targetIndex>#allGridData then
targetIndex=#allGridData
end
this.turnEffect:Reset(function()
curGridIndex=curGridIndex+1
this.TT.transform:DOAnchorPos(Vector3(allGridData[curGridIndex].x,allGridData[curGridIndex].y,0),0.3)
this.MapMove(allGridData[curGridIndex].x,0.3)
if curGridIndex==targetIndex then--如果停到对应位置
this.turnEffect:Stop()--暂停
this.mapProcess.text=string.format("%d%%",(curGridIndex/#allGridData*100))
if allGridData[curGridIndex].event~=nil then
this.EventTrigger(_data)
end
if curGridIndex>=#allGridData then
MsgPanel.ShowTwo("已到达终点,是否重新云游!", nil, function()
XiaoYaoManager.OpenMapList()
end)
end
end
end,0.3,-1,true)
this.turnEffect:Start()
end
function this.EventTrigger(_data)
Log("触发事件类型为:".._data.pathType)
if _data.pathType==0 then --普通节点
elseif _data.pathType==1 then --宝箱
elseif _data.pathType==2 then --双倍节点
elseif _data.pathType==3 then --额外骰子节点
elseif _data.pathType==4 then --招募英雄节点
this.shopBtn.gameObject:SetActive(true)
elseif _data.pathType==5 then --怪物节点
this.bossBtn.gameObject:SetActive(true)
elseif _data.pathType==6 then --转盘
this.rouleBtn.gameObject:SetActive(true)
end
this.shopBtn.gameObject:SetActive(true)
if _data.drop.itemlist ~= nil and #_data.drop.itemlist > 0 then
local content = {}
for i = 1, #_data.drop.itemlist do
local itemdata = {}
itemdata.configData = itemConfig[_data.drop.itemlist[i].itemId]
itemdata.name = itemdata.configData.Name
itemdata.icon = Util.LoadSprite(GetResourcePath(itemdata.configData.ResourceID))
itemdata.num = _data.drop.itemlist[i].itemNum
table.insert(content, itemdata)
end
PopupText(content, 0.5, 2)
end
end
--界面打开时调用(用于子类重写)
function this:OnOpen(...)
for i = 1, #XiaoYaoManager.curMapData.cell do
Log("cellId:"..XiaoYaoManager.curMapData.cell[i].cellId)
local x, y=Map_Pos2UV(XiaoYaoManager.curMapData.cell[i].cellId)
Log("cellx:"..x)
curGridIndex=XiaoYaoManager.curMapData.location
Log("当前位置索引:"..curGridIndex)
for i = 1, #XiaoYaoManager.curMapData.cell do
local x, y=Map_Pos2UV(XiaoYaoManager.curMapData.cell[i].cellId)
allGridData[i]={}
allGridData[i].x=x*128-64
allGridData[i].y=-y*128+64
if XiaoYaoManager.curMapData.cell[i].pointId>0 then
allGridData[i].event = ConfigManager.GetConfigData(ConfigName.MapPointConfig,XiaoYaoManager.curMapData.cell[i].pointId).Icon
Log("x:"..x.." y:"..y.." event:".. allGridData[i].event)
allGridData[i].event = ConfigManager.GetConfigData(ConfigName.MapPointConfig,XiaoYaoManager.curMapData.cell[i].pointId).Icon
end
end
Log("当前数量"..this.gridParent.transform.childCount)
@ -149,7 +188,10 @@ function this:OnOpen(...)
this.TT.transform:DOAnchorPos(Vector3(allGridData[curGridIndex].x,allGridData[curGridIndex].y,0),0)
this.TT.transform:SetAsLastSibling()
this.MapMove(allGridData[curGridIndex].x,0)
local mapBg = ConfigManager.GetConfigDataByKey(ConfigName.FreeTravel,"MapID",XiaoYaoManager.curMapId).MapImage
local mapConfig=ConfigManager.GetConfigDataByKey(ConfigName.FreeTravel,"MapID",XiaoYaoManager.curMapId)
this.mapName.text=mapConfig.FreeTravelName
this.mapProcess.text=string.format("%d%%",(curGridIndex/#allGridData*100))
local mapBg = mapConfig.MapImage
Log("当前地图id"..XiaoYaoManager.curMapId)
for i = 1, #mapBg do
Log(mapBg[i])
@ -159,8 +201,7 @@ function this:OnOpen(...)
end
function this.MapMove(curX,moveTime)
Log("当前位置:"..curX)
if curX>2700 then
if curX>2700 and this.mapParent.transform.position.x<=-2200 then
return
end
if curX>540 then

View File

@ -40,7 +40,6 @@ end
--界面打开时调用(用于子类重写)
function this:OnOpen(data)
--显示资源条
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.MonsterCamp })
local _allData={}
@ -50,6 +49,7 @@ function this:OnOpen(data)
local _isUnLock=_cruLevel>=config.UnlockLevel--判断章节是否开启
local showReward = ConfigManager.GetConfigData(ConfigName.RewardGroup,config.FinalReward).ShowItem
local _progress=0
Log("当前mapid"..config.MapID)
if data[config.MapID]~=nil then
_progress=data[config.MapID]
end