[四灵] 提交

dev_chengFeng
jiaoyangna 2020-12-22 20:33:35 +08:00
parent 9c412cad00
commit 27568171e5
24 changed files with 12142 additions and 4589 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: ba990f79f8a40df41b99c79ce0b707c1
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 29e44f935823374418e5ac68f2a3d022
vertices: []
indices:
edges: []
weights: []
spritePackingTag: FourElement
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 0cb14062854c90647aef9b10e606cfea
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: c1dbc56c28c6ad74098af07b77401aba
vertices: []
indices:
edges: []
weights: []
spritePackingTag: FourElement
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 8d757c0704f0ad7468999822632154e4
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 1188288efd6e64d419e3b9e0562597e3
vertices: []
indices:
edges: []
weights: []
spritePackingTag: FourElement
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 9f79ef2af431f3f4988cfc49fcca8fa9
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 0de33b958cb3ea7439858b3164e62853
vertices: []
indices:
edges: []
weights: []
spritePackingTag: FourElement
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -244,7 +244,6 @@ GameObject:
- component: {fileID: 6322346027670360478}
- component: {fileID: 4998803387828593761}
- component: {fileID: 8413413926763758802}
- component: {fileID: 6535186558894153063}
m_Layer: 5
m_Name: MonsterCampMainPanel
m_TagString: Untagged
@ -330,20 +329,6 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &6535186558894153063
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1492168094597050616}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7fdc50ec1a2f1534f93155e67c3708ab, type: 3}
m_Name:
m_EditorClassIdentifier:
bgList:
- {fileID: 3952936349900287652}
--- !u!1 &1636498632562051768
GameObject:
m_ObjectHideFlags: 0
@ -1072,7 +1057,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1252269825180492747}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@ -1299,7 +1284,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1252269825180492747}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@ -1431,7 +1416,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 3961690423647271749}
- component: {fileID: 1506110947011109270}
m_Layer: 5
m_Name: SiLingDi
m_TagString: Untagged
@ -1457,21 +1441,13 @@ RectTransform:
- {fileID: 6342401768048007323}
- {fileID: 2324327699674677198}
m_Father: {fileID: 1327116469934475768}
m_RootOrder: 3
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -352.29993}
m_SizeDelta: {x: 1080, y: 1215.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1506110947011109270
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4407989783316076089}
m_CullTransparentMesh: 0
--- !u!1 &4533740477732200442
GameObject:
m_ObjectHideFlags: 0
@ -1503,7 +1479,7 @@ RectTransform:
m_Children:
- {fileID: 4411714024882206677}
m_Father: {fileID: 1327116469934475768}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@ -1898,11 +1874,11 @@ RectTransform:
m_LocalScale: {x: 0.95238096, y: 0.95238096, z: 1}
m_Children: []
m_Father: {fileID: 1252269825180492747}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.26, y: 502}
m_AnchoredPosition: {x: 0.26003778, y: 502}
m_SizeDelta: {x: 503, y: 208}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6761305433739030198
@ -2073,6 +2049,7 @@ GameObject:
m_Component:
- component: {fileID: 1327116469934475768}
- component: {fileID: 1461380327226170849}
- component: {fileID: 5552363922948444391}
m_Layer: 5
m_Name: Bg
m_TagString: Untagged
@ -2091,10 +2068,10 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 3961690423647271749}
- {fileID: 1252269825180492747}
- {fileID: 1230853736198021691}
- {fileID: 7812381780249632018}
- {fileID: 3961690423647271749}
m_Father: {fileID: 3868292975904342917}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -2111,6 +2088,35 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6581176617949525810}
m_CullTransparentMesh: 0
--- !u!114 &5552363922948444391
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6581176617949525810}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: d1f7c79c4d2d0ce43af3940d4b914856, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &6778560999596628872
GameObject:
m_ObjectHideFlags: 0
@ -2732,7 +2738,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1252269825180492747}
- component: {fileID: 3824200238808245532}
m_Layer: 5
m_Name: BgRoot
m_TagString: Untagged
@ -2751,26 +2756,17 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.05, y: 1.05, z: 1}
m_Children:
- {fileID: 2755070515873760008}
- {fileID: 721588110232646809}
- {fileID: 6760869819602811802}
- {fileID: 2178611684651558167}
m_Father: {fileID: 1327116469934475768}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1080, y: 1920}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3824200238808245532
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8314253426226152059}
m_CullTransparentMesh: 0
--- !u!1 &8549744472592868464
GameObject:
m_ObjectHideFlags: 0
@ -2802,12 +2798,12 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1327116469934475768}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1080, y: 658.6}
m_AnchoredPosition: {x: 0, y: 40.1}
m_SizeDelta: {x: 1080, y: 578.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2107404549516100854
CanvasRenderer:
@ -2962,77 +2958,3 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &9005684681099647688
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2755070515873760008}
- component: {fileID: 7624005974227399836}
- component: {fileID: 1076432784349120130}
m_Layer: 5
m_Name: Bg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2755070515873760008
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9005684681099647688}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1252269825180492747}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.26000977, y: 0}
m_SizeDelta: {x: 1080, y: 1920}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7624005974227399836
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9005684681099647688}
m_CullTransparentMesh: 0
--- !u!114 &1076432784349120130
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9005684681099647688}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: d1f7c79c4d2d0ce43af3940d4b914856, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0

View File

@ -2212,6 +2212,6 @@ Pokemon_Formation_RefreshType={
DownZhen = 2,--下阵
Replace = 3,--替换
}
FourElementName = {"人杰试炼","妖灵试炼","佛禅试炼","道玄试炼"}
FourElementNameImage = {"s_silingshilian_renjiezi","s_silingshilian_yaolingzi","s_silingshilian_fochanzi","s_silingshilian_daoxuanzi"}
FourElementName = {"人杰试炼","佛禅试炼","妖灵试炼","道玄试炼"}
FourElementNameImage = {"s_silingshilian_renjiezi","s_silingshilian_fochanzi","s_silingshilian_yaolingzi","s_silingshilian_daoxuanzi"}
NumConvertWeek = {[1]=Language[10005],[2]=Language[10006],[3]=Language[10007],[4]=Language[10008],[5]=Language[10009],[6]=Language[10010],[7]=Language[12303]}

View File

@ -418,5 +418,8 @@ GameEvent = {
},
Role={
UpdateSkin="Role.UpdateSkin",-- 刷新皮肤
},
FourEle={
UpdatePri="FourEle.UpdatePri",-- 刷新皮肤
}
}

View File

@ -14,7 +14,7 @@ local contentScripts = {
--贪婪
[5]= {view=require("Modules/Expedition/View/ExpeditionMonsterInfo_Greed"),panelName="ExpeditionMonsterInfo_Greed",type=EXPEDITON_POPUP_TYPE.Greed},
-- 四灵试炼 boss
[6]= {view=require("Modules/Expedition/View/MonsterFormationInfo"),panelName="ExpeditionMonsterInfo_Monster",type = EXPEDITON_POPUP_TYPE.FourElementMonster},
[6]= {view=require("Modules/Expedition/View/MonsterFormationInfo"),panelName="MonsterFormationInfo",type = EXPEDITON_POPUP_TYPE.FourElementMonster},
}
--子模块预设
local contentPrefabs={}

View File

@ -79,6 +79,7 @@ function this:BtnClickEvent()
elseif (waveId == data.monsterWave + 1) then
if data.canFightTime > 0 then
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.FOUR_ELEMENT, curType,waveId)
parent:ClosePanel()
else
PopupTipPanel.ShowTip("今日已无可挑战层数!")
end
@ -105,12 +106,11 @@ function this:OnShow(_parent,...)
storeDataId,itemId,costNum = MonsterCampManager.GetCost(curType)
configData = MonsterCampManager.GetFourElementMonsterInfoByWave(curType,waveId)
data = MonsterCampManager.GetCurFourElementMonsterInfo(curType)
this.root.gameObject:SetActive(waveId < data.monsterWave)
Util.SetGray(this.fightBtn,false)
this.fightBtnIcon.gameObject:SetActive(false)
this.fightBtnNum.gameObject:SetActive(false)
if waveId == data.monsterWave then
Util.GetGameObject(this.fightBtn,"mask"):GetComponent("Image").sprite = Util.LoadSprite("r_chouka_button_002")
this.fightBtn:GetComponent("Image").sprite = Util.LoadSprite("r_chouka_button_002")
if freeTime > 0 then
this.fightBtnText.text = "免费扫荡"
else
@ -130,10 +130,10 @@ function this:OnShow(_parent,...)
end
end
elseif (waveId == data.monsterWave + 1) then
Util.GetGameObject(this.fightBtn,"mask"):GetComponent("Image").sprite = Util.LoadSprite("r_chouka_button_001")
this.fightBtnText.text = "挑战"
this.fightBtn:GetComponent("Image").sprite = Util.LoadSprite("r_chouka_button_001")
this.fightBtnText.text = string.format("<color=#%s>%s</color>","17232A","挑战")
else
this.fightBtnText.text = "确定"
this.fightBtnText.text =string.format("<color=#%s>%s</color>","17232A","确定")
end
local rewardIds = {}
@ -155,12 +155,11 @@ end
function this:FormationAdapter()
this.titleText.text = string.format("%s层",configData.wave)
this.power.text = configData.power
local bossTeaminfo = ConfigManager.GetConfigData(ConfigName.MonsterGroup,configData.Monster)
local bossTeaminfo = configData.monster
for i = 1, #heroListGo do
if (bossTeaminfo.Contents[1][i]) and bossTeaminfo.Contents[1][i] > 0 then
if (bossTeaminfo[i]) and bossTeaminfo[i] > 0 then
heroListGo[i].transform.parent:GetComponent("Image").sprite=Util.LoadSprite("t_chengyuankuang_kuang")
this.SetCardSingleData(heroListGo[i],bossTeaminfo.Contents[1][i],i)
this.SetCardSingleData(heroListGo[i],bossTeaminfo[i],i)
heroListGo[i]:SetActive(true)
else
heroListGo[i]:SetActive(false)
@ -178,8 +177,6 @@ end
--设置单个上阵英雄信息
function this.SetCardSingleData(o,monsterId, _pos)
local pos=Util.GetGameObject(o,"Pos"):GetComponent("Image")
pos:SetActive(false)
local yuanImage=Util.GetGameObject(o,"yuanImage")
yuanImage:SetActive(false)
local hp = Util.GetGameObject(o,"hpProgress")
@ -187,7 +184,6 @@ function this.SetCardSingleData(o,monsterId, _pos)
local rage = Util.GetGameObject(o,"rageProgress")
rage:SetActive(false)
local monsterconfig = ConfigManager.GetConfigData(ConfigName.MonsterConfig, monsterId)
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, monsterconfig.MonsterId)
@ -233,7 +229,7 @@ function this.SetCardSingleData(o,monsterId, _pos)
end
function this:OnClose()
rewardData = {}
end
function this:OnDestroy()

View File

@ -240,21 +240,21 @@ function this:OnOpen(_panelType,...)
end
function this:SetCampIcon()
if panelType == FormationTypeDef.FOUR_ELEMENT then
if panelType == FORMATION_TYPE.FOUR_ELEMENT then
this.opView.SetCampIconByCurType(tabs,this.selectBtn)
else
for i = 0 , #tabs do
Util.SetGray(tabs[i],false)
tabs[i]:GetComponent("Button").enabled = true
tabs[i]:GetComponent("Button").enabled = true
end
end
end
function this:OnShow()
this.ElementalResonanceView:OnOpen({sortOrder=self.sortingOrder})
this:SetCampIcon()
this.SetDrawLevel()
this.RefreshFormation()
this:SetCampIcon()
end
function this:OnClose()
@ -844,7 +844,7 @@ function this.OnEndDrag(Pointgo,data)--结束拖动
end
this.line.gameObject:SetActive(false)
this.SetCardsData()
this.OnClickTabBtn(proId)
--this.OnClickTabBtn(proId)
end
function this.OnDrag(Pointgo,data)--拖动中
if data.pointerEnter==nil then--拖到屏幕外

View File

@ -35,18 +35,17 @@ function this.GetFormationIndex()
end
--- 设置阵营
function this.SetCampIconByCurType(tabs)
function this.SetCampIconByCurType(tabs,selectBtn)
for i = 0 , #tabs do
if i == (curType - 1) then
tabs[i]:GetComponent("Button").enabled = false
if i == curType then
selectBtn:SetActive(true)
selectBtn.transform:SetParent(tabs[i].transform)
selectBtn.transform:DOAnchorPos(Vector3.zero,0)
selectBtn.transform:DOScale(Vector3.one,0)
Util.SetGray(tabs[i],false)
tabs[i]:GetComponent("Button").enabled = true
this.selectBtn:SetActive(true)
this.selectBtn.transform:SetParent(tabs[i].transform)
this.selectBtn.transform:DOAnchorPos(Vector3.zero,0)
this.selectBtn.transform:DOScale(Vector3.one,0)
else
Util.SetGray(tabs[i],true)
tabs[i]:GetComponent("Button").enabled = false
end
end
end

View File

@ -479,7 +479,7 @@ function this.ExecuteLoading()
--[[[34] =]] function() HeroManager.CheckRepeatTreasure(LoadingPanel.OnStep) end,
--[[[34] =]] function() XiaoYaoManager.GetOpenMapData(LoadingPanel.OnStep) end,
function() NetManager.GetHeroSkinData(LoadingPanel.OnStep) end,
function() NetManager.GetFourElementGetInfo(LoadingPanel.OnStep) end,
--function() NetManager.GetFourElementGetInfo(LoadingPanel.OnStep) end,
--[[[35] =]] function() -- 登录请求最终接口,所有请求放在此接口之前
if AppConst.isGuide then

View File

@ -1,11 +1,11 @@
require("Base/BasePanel")
require("View/FourElementSingleWave")
FourElementMonsterCampPanel = Inherit(BasePanel)
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local this = FourElementMonsterCampPanel
this.monsterInfoList = {}
this.rewardList = {}
this.grid = {}
this.singledataList = {}
local curType = 0
local trailData = {}
@ -57,10 +57,12 @@ function FourElementMonsterCampPanel:BindEvent()
PopupTipPanel.ShowTip(string.format(Language[10343], itemConfig[itemId].Name))
return
end
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,1,function()
PrivilegeManager.RefreshPrivilegeUsedTimes(trailData.buyTimeId, 1)
this:UpdatePrivilage()
end)
MsgPanel.ShowTwo(string.format("是否花费%s%s购买一次扫荡次数",costNum,itemConfig[itemId].Name),function() end,function()
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,1,function()
PrivilegeManager.RefreshPrivilegeUsedTimes(trailData.buyTimeId, 1)
this.UpdatePrivilage()
end)
end,"取消","确定")
end
end)
Util.AddClick(this.btnRank, function ()
@ -71,26 +73,30 @@ function FourElementMonsterCampPanel:BindEvent()
end)
end
function this:UpdatePrivilage()
this.UpdatePrivilage = function()
if this.singledataList[trailData.monsterWave] then
this.singledataList[trailData.monsterWave]:UpdatePrivilage()
end
storeDataId,itemId,costNum = MonsterCampManager.GetCost(curType)
end
freeTimes,buyTimes = MonsterCampManager.GetTimeTip(curType)
this.freeMoppingTimes.text = "免费扫荡:" ..freeTimes
this.buyMoppingTimes.text = "购买次数:" ..buyTimes
end
--添加事件监听(用于子类重写)
function FourElementMonsterCampPanel:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.FourEle.UpdatePri, this.UpdatePrivilage)
end
--移除事件监听(用于子类重写)
function FourElementMonsterCampPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.FourEle.UpdatePri, this.UpdatePrivilage)
end
--界面打开时调用(用于子类重写)
function FourElementMonsterCampPanel:OnOpen(index)
curType = index
trailData = MonsterCampManager.GetCurFourElementMonsterInfo(index)
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.MonsterCamp })
this.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.MonsterCamp })
end
--界面打开时调用(用于子类重写)
@ -99,164 +105,27 @@ function FourElementMonsterCampPanel:OnShow()
this.titleText.text = FourElementName[curType]
this.canFightWaves.text = "可挑战层数:"..trailData.canFightTime
freeTimes,buyTimes = MonsterCampManager.GetTimeTip(curType)
this.freeMoppingTimes = "免费扫荡:" ..freeTimes
this.buyMoppingTimes = "购买次数:" ..buyTimes
this.freeMoppingTimes.text = "免费扫荡:" ..freeTimes
this.buyMoppingTimes.text= "购买次数:" ..buyTimes
this.InitMonsterShow()
end
-- 初始化奖励显示
function this.InitShowReward(reward,rewardShow)
local rewardGrid = Util.GetGameObject(reward,"grid")
if not this.rewardList[reward] then
this.rewardList[reward] = {}
end
for i = 1 ,#this.rewardList[reward] do
this.rewardList[reward][i].gameObject:SetActive(false)
end
for i = 1,#rewardShow do
if not this.rewardList[reward][i] then
this.rewardList[reward][i] = SubUIManager.Open(SubUIConfig.ItemView, rewardGrid.transform)
this.rewardList[reward][i].gameObject:SetActive(false)
end
this.rewardList[reward][i]:OnOpen(false, {rewardShow[i].id,rewardShow[i].num}, 0.65,false,false,false)
this.rewardList[reward][i].gameObject:SetActive(true)
end
end
--设置每条英雄数据
function this.SingleHeroDataShow(_go, monConfig,heroData,wave)
local go = _go
local frame=Util.GetGameObject(go,"Bg1"):GetComponent("Image")
local icon=Util.GetGameObject(go, "Mask/icon"):GetComponent("RawImage")
local lv= Util.GetGameObject(go, "lv/Text"):GetComponent("Text")
local pro= Util.GetGameObject(go, "Pro/Image"):GetComponent("Image")
local starGrid = Util.GetGameObject(go, "star")
frame.sprite=Util.LoadSprite(GetHeroQuantityImageByquality(monConfig.Quality,monConfig.Star))
local liveName = heroData.live
icon.texture = CardRendererManager.GetSpineTexture(1, heroData.live, Vector3.one * heroData.scale, Vector3.New(heroData.position[1],heroData.position[2],0), true)
icon.transform.localScale = Vector3.one
icon.transform.localPosition = Vector3.zero
lv.text = monConfig.Level
pro.sprite= Util.LoadSprite(GetProStrImageByProNum(heroData.property))
SetHeroStars(starGrid, monConfig.Star,1,Vector2.New(30,30),-8)
Util.AddOnceClick(go, function()
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,curType,wave)
end)
end
function this.SingleDataShow(go, data)
local wave = Util.GetGameObject(go,"bg/leftLayout/num"):GetComponent("Text")
local power = Util.GetGameObject(go,"bg/power/Text"):GetComponent("Text")
local reward = Util.GetGameObject(go,"bg/rewardRect")
local fight = Util.GetGameObject(go,"bg/fight")
local pass = Util.GetGameObject(go,"bg/pass"):GetComponent("Image")
local title = Util.GetGameObject(go,"bg/leftLayout/title"):GetComponent("Image")
local hero = Util.GetGameObject(go,"bg/Hero")
local rewardText = Util.GetGameObject(reward,"Text"):GetComponent("Text")
local fightBtnIcon = Util.GetGameObject(fight,"layout/icon"):GetComponent("Image")
local fightBtnNum = Util.GetGameObject(fight,"layout/num"):GetComponent("Text")
local fightBtnText = Util.GetGameObject(fight,"layout/Text"):GetComponent("Text")
fightBtnIcon.gameObject:SetActive(false)
fightBtnNum.gameObject:SetActive(false)
wave.text = ""..data.wave..""
power.text = data.power
title.sprite = Util.LoadSprite(GetProStrImageByProNum(curType))
Util.GetGameObject(go,"bg"):GetComponent("Image").sprite = Util.LoadSprite(GetFourElementBgByType(curType))
if data.wave < trailData.monsterWave then
pass.gameObject:SetActive(true)
fight.gameObject:SetActive(false)
reward.gameObject:SetActive(false)
hero.gameObject:SetActive(false)
else
pass.gameObject:SetActive(false)
hero.gameObject:SetActive(true)
fight.gameObject:SetActive(true)
rewardText.text = "挑战奖励"
if data.wave == trailData.monsterWave then
--设置扫荡按钮
rewardText.text = "扫荡奖励"
Util.GetGameObject(this.fightBtn,"mask"):GetComponent("Image").sprite = Util.LoadSprite("r_chouka_button_002")
if freeTimes > 0 then
fightBtnText.text = "免费扫荡"
else
fightBtnIcon.gameObject:SetActive(true)
fightBtnNum.gameObject:SetActive(true)
fightBtnIcon.sprite = Util.LoadSprite(GetResourcePath(itemConfig[itemId]))
local color = 0
if BagManager.GetItemCountById(itemId) < costNum then
color = "E71515"
else
color = "17232A"
end
fightBtnNum.text =string.format("<color=#%s>%s</color>",color,costNum)
fightBtnText.text = "扫荡"
if buyTimes < 1 then
Util.SetGray(this.fightBtn,true)
end
end
else
if data.firstReward and #data.firstReward then
this.InitShowReward(reward, data.firstReward)
reward.gameObject:SetActive(true)
else
reward.gameObject:SetActive(false)
end
if data.wave == trailData.monsterWave + 1 then
--设置挑战fight
Util.GetGameObject(fight,"mask"):GetComponent("Image").sprite = Util.LoadSprite("r_chouka_button_001")
fightBtnText.text = "挑战"
else
fight.gameObject:SetActive(false)
end
end
end
this.SingleHeroDataShow(hero, data.monsterConfig,data.herodata,data.wave)
Util.AddOnceClick(pass.gameObject, function()
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,curType,wave)
end)
Util.AddOnceClick(fight, function()
if data.wave == trailData.monsterWave then
if freeTimes <=0 and buyTimes <= 0 then
PopupTipPanel.ShowTip("今日已无扫荡次数!")
return
end
if freeTimes <= 0 then
if BagManager.GetItemCountById(itemId) < costNum then
PopupTipPanel.ShowTip(string.format(Language[10343], itemConfig[itemId].Name))
return
end
MsgPanel.ShowTwo(string.format("是否花费%s%s购买一次扫荡次数",costNum,itemConfig[itemId].Name),function() end,function()
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,1,function()
PrivilegeManager.RefreshPrivilegeUsedTimes(trailData.buyTimeId, 1)
MonsterCampManager.ExecuteFightBattle(data.wave,2,function()
PrivilegeManager.RefreshPrivilegeUsedTimes(trailData.freeTimeId, 1)
this:UpdatePrivilage()
end)
end)
end,"取消","确定")
end
elseif data.wave == trailData.monsterWave + 1 then
if data.canFightTime > 0 then
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.FOUR_ELEMENT, curType,data.wave)
else
PopupTipPanel.ShowTip("今日已无可挑战层数!")
end
else
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,curType,wave)
end
end)
local singledata = FourElementSingleWave:New(go)
singledata:InitComponent(go,data,curType)
singledata:OnOpen()
return singledata
end
function this.InitMonsterShow()
local curwaves = trailData.monsterWave + 1 --当前可挑战层
local monsterInfo = MonsterCampManager.GetFourElementMonstersInfo(curType,curwaves)
table.sort(monsterInfo,function(a,b) return a.wave > b.wave end)
this.scrollView:SetData(monsterInfo, function (index, go)
this.SingleDataShow(go, monsterInfo[index])
local tempData = this.SingleDataShow(go, monsterInfo[index])
this.singledataList[monsterInfo[index].wave] = tempData
end)
this.scrollView:SetIndex((#monsterInfo-trailData.monsterWave))
end
--界面关闭时调用(用于子类重写)
@ -266,8 +135,10 @@ end
--界面销毁时调用(用于子类重写)
function FourElementMonsterCampPanel:OnDestroy()
this.monsterInfoList = {}
this.rewardList = {}
this.singledataList = {}
for k,v in pairs(this.singledataList) do
v:OnDestroy()
end
end
return FourElementMonsterCampPanel

View File

@ -100,7 +100,7 @@ function MonsterCampMainPanel:SetSingleTrailData(go,data)
local openTime = Util.GetGameObject(go, "openTime"):GetComponent("Text")
title.sprite = Util.LoadSprite(FourElementNameImage[data.fourElementType])
curwave.text = (data.monsterWave + 1)..""
canFightWave.text = data.canFightTime
canFightWave.text = "可挑战层数:"..data.canFightTime
openTime.text = this:GetOpenTime(data.fourElementType).."开启"
Util.SetGray(go, data.openState == 0)
Util.AddOnceClick(go,function()
@ -124,7 +124,7 @@ end
--界面销毁时调用(用于子类重写)
function MonsterCampMainPanel:OnDestroy()
SubUIManager.Close(this.UpView)
trails = {}
end
return MonsterCampMainPanel

View File

@ -7,7 +7,7 @@ local monterViewConfig = ConfigManager.GetConfig(ConfigName.MonsterViewConfig)
local heroViewConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
local resConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local CampTowerConfig = ConfigManager.GetConfig(ConfigName.CampTowerConfig)
local campTowerSetting = ConfigManager.GetConfig(ConfigName.CampTowerSetting)
--四灵试炼数据
this.fourMonsterData = {}
@ -18,16 +18,15 @@ function this.Initialize()
local config = {}
for i = 1 ,4 do
this.fourMonsterData[i] = {}
local config = ConfigManager.GetConfigDataByKey(ConfigName.CampTowerConfig,"CampId",i)
this.fourMonsterData[i].canFightId = config.Privilege[1]
this.fourMonsterData[i].freeTimeId = config.Privilege[2]
this.fourMonsterData[i].buyTimeId = config.Privilege[3]
this.fourMonsterData[i].freeTimeId = campTowerSetting[1].FlashTimesPrice[i][1]
this.fourMonsterData[i].buyTimeId = campTowerSetting[1].FlashTimesPrice[i][2]
this.fourMonsterData[i].teamId = campTowerSetting[1].Formation[i]
this.fourMonsterData[i].monsterWave = 0
--0 未开 1已开
this.fourMonsterData[i].openState = 0
this.fourMonsterData[i].openState = 1
this.fourMonsterData[i].freeTime = 0
this.fourMonsterData[i].buyTime = 0
this.fourMonsterData[i].canFightTime = 0
this.fourMonsterData[i].canFightTime = 10
this.fourMonsterData[i].fourElementType = i
end
end
@ -44,14 +43,14 @@ end
--设置扫荡剩余次数
function this.GetTimeTip(campId)
LogBlue("购买总次数:"..PrivilegeManager.GetPrivilegeNumber(this.fourMonsterData[campId].buyTimeId))
LogBlue("购买使用的次数:"..PrivilegeManager.GetPrivilegeUsedTimes(this.fourMonsterData[campId].buyTimeId))
LogBlue("免费总次数:"..PrivilegeManager.GetPrivilegeNumber(this.fourMonsterData[campId].freeTimeId))
LogBlue("免费使用次数:"..PrivilegeManager.GetPrivilegeUsedTimes(this.fourMonsterData[campId].freeTimeId))
-- LogBlue("购买总次数:"..PrivilegeManager.GetPrivilegeNumber(this.fourMonsterData[campId].buyTimeId))
-- LogBlue("购买使用的次数:"..PrivilegeManager.GetPrivilegeUsedTimes(this.fourMonsterData[campId].buyTimeId))
-- LogBlue("免费总次数:"..PrivilegeManager.GetPrivilegeNumber(this.fourMonsterData[campId].freeTimeId))
-- LogBlue("免费使用次数:"..PrivilegeManager.GetPrivilegeUsedTimes(this.fourMonsterData[campId].freeTimeId))
this.fourMonsterData[campId].buyTime = PrivilegeManager.GetPrivilegeRemainValue(this.fourMonsterData[campId].buyTimeId)
LogBlue("购买剩余次数:"..this.fourMonsterData[campId].buyTime)
--LogBlue("购买剩余次数:"..this.fourMonsterData[campId].buyTime)
this.fourMonsterData[campId].freeTime= PrivilegeManager.GetPrivilegeRemainValue(this.fourMonsterData[campId].freeTimeId) --免费次数
LogBlue("免费剩余次数:"..this.fourMonsterData[campId].buyTime)
--LogBlue("免费剩余次数:"..this.fourMonsterData[campId].buyTime)
return this.fourMonsterData[campId].freeTime,this.fourMonsterData[campId].buyTime
end
@ -77,7 +76,7 @@ end
function this.GetCurFourElementMonsterInfo(index)
return this.fourMonsterData[index]
end
--得到从第1层到当前层的数据
function this.GetFourElementMonstersInfo(curType,curWave)
local monsterInfo = {}
local data = ConfigManager.GetConfigDataByDoubleKey(ConfigName.CampTowerConfig,"CampId",curType,"FloorId",curWave)
@ -120,6 +119,7 @@ function this.GetFourElementMonsterInfoByWave(curType,wave)
local monsterGroupId = tempConfig.Monster
-- 默认显示第一只怪
local id = monsterGroupConfig[monsterGroupId].Contents[1][1]
data.monster = monsterGroupConfig[monsterGroupId].Contents[1]
data.monsterConfig = monsterConfig[id]
data.herodata = this.SetSingleMonster(data.monsterConfig.MonsterId)
return data
@ -128,6 +128,7 @@ end
function this.SetSingleMonster(id)
local herodata = {}
local _configData = ConfigManager.GetConfigData(ConfigName.HeroConfig,id)
herodata.heroConfig = _configData
herodata.live = GetResourcePath(_configData.Live)
herodata.painting = GetResourcePath(_configData.Painting)
herodata.icon = GetResourcePath(_configData.Icon)
@ -161,7 +162,7 @@ end
--开始战斗
function this.ExecuteFightBattle(id,type,func,curType)
local fightId = ConfigManager.GetConfigDataByDoubleKey("FloorId",id,"CampId",type).Id
local fightId = ConfigManager.GetConfigDataByDoubleKey(ConfigName.CampTowerConfig,"FloorId",id,"CampId",type).Id
NetManager.StartSituationChallengeRequest(fightId,type,function(msg)
if type == 1 then
local fightData = BattleManager.GetBattleServerData(msg,0)

View File

@ -0,0 +1,220 @@
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
FourElementSingleWave = {}
function FourElementSingleWave:New(gameObject)
local b = {}
b.gameObject = gameObject
b.transform = gameObject.transform
setmetatable(b, { __index = FourElementSingleWave })
return b
end
--初始化组件(用于子类重写)
function FourElementSingleWave:InitComponent(go,_data,_curType)
self.wave = Util.GetGameObject(go,"bg/leftLayout/num"):GetComponent("Text")
self.power = Util.GetGameObject(go,"bg/power/Text"):GetComponent("Text")
self.reward = Util.GetGameObject(go,"bg/rewardRect")
self.fight = Util.GetGameObject(go,"bg/fight")
self.pass = Util.GetGameObject(go,"bg/pass"):GetComponent("Image")
self.title = Util.GetGameObject(go,"bg/leftLayout/title"):GetComponent("Image")
self.hero = Util.GetGameObject(go,"bg/Hero")
self.rewardText = Util.GetGameObject(self.reward,"Text"):GetComponent("Text")
self.fightBtnIcon = Util.GetGameObject(self.fight,"layout/icon"):GetComponent("Image")
self.fightBtnNum = Util.GetGameObject(self.fight,"layout/num"):GetComponent("Text")
self.fightBtnText = Util.GetGameObject(self.fight,"layout/Text"):GetComponent("Text")
self.fightBtnMask = Util.GetGameObject(self.fight,"mask"):GetComponent("Image")
self.bg = Util.GetGameObject(go,"bg"):GetComponent("Image")
self.rewardGrid = Util.GetGameObject(self.reward,"grid")
self.frame=Util.GetGameObject(self.hero,"Bg1"):GetComponent("Image")
--self.icon=Util.GetGameObject(self.hero, "Mask/icon"):GetComponent("RawImage")
self.icon=Util.GetGameObject(self.hero, "Mask/icon"):GetComponent("Image")
self.lv = Util.GetGameObject(self.hero, "lv/Text"):GetComponent("Text")
self.pro = Util.GetGameObject(self.hero, "Pro/Image"):GetComponent("Image")
self.fg = Util.GetGameObject(self.hero,"Bg2"):GetComponent("Image")
self.starGrid = Util.GetGameObject(self.hero,"starGrid")
self.name=Util.GetGameObject(self.hero,"Name/Text"):GetComponent("Text")
self.data = _data
self.trailData = MonsterCampManager.GetCurFourElementMonsterInfo(_curType)
self.storeDataId,self.itemId,self.costNum = MonsterCampManager.GetCost(self.trailData.fourElementType)
self.freeTimes,self.buyTimes = MonsterCampManager.GetTimeTip(self.trailData.fourElementType)
self.rewardList = {}
for i = 1, self.rewardGrid.transform.childCount do
local temp = self:NewItemView(SubUIConfig.ItemView, self.rewardGrid.transform:GetChild(i-1).gameObject)
table.insert(self.rewardList,temp)
end
end
function FourElementSingleWave:OnOpen()
self.fightBtnIcon.gameObject:SetActive(false)
self.fightBtnNum.gameObject:SetActive(false)
self.wave.text = ""..self.data.wave..""
self.power.text = self.data.power
self.title.sprite = Util.LoadSprite(GetProStrImageByProNum(self.trailData.fourElementType))
self.bg.sprite = Util.LoadSprite(GetFourElementBgByType(self.trailData.fourElementType))
if self.data.wave < self.trailData.monsterWave then
self.pass.gameObject:SetActive(true)
self.fight.gameObject:SetActive(false)
self.reward.gameObject:SetActive(false)
self.hero.gameObject:SetActive(false)
else
self.pass.gameObject:SetActive(false)
self.hero.gameObject:SetActive(true)
self.fight.gameObject:SetActive(true)
self.rewardText.text = "挑战奖励"
self:SetIcon()
if self.rewardData and #self.rewardData then
self:InitShowReward()
self.reward.gameObject:SetActive(true)
else
self.reward.gameObject:SetActive(false)
end
end
self:SingleHeroDataShow(self.data.monsterConfig,self.data.herodata)
Util.AddOnceClick(self.pass.gameObject, function()
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.wave)
end)
Util.AddOnceClick(self.hero, function()
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.wave)
end)
Util.AddOnceClick(self.fight, function()
if self.data.wave == self.trailData.monsterWave then
if self.freeTimes <=0 and self.buyTimes <= 0 then
PopupTipPanel.ShowTip("今日已无扫荡次数!")
return
end
if self.freeTimes <= 0 then
if BagManager.GetItemCountById(self.itemId) < self.costNum then
PopupTipPanel.ShowTip(string.format(Language[10343], itemConfig[self.itemId].Name))
return
end
MsgPanel.ShowTwo(string.format("是否花费%s%s购买一次扫荡次数",self.costNum,itemConfig[self.itemId].Name),function() end,function()
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,self.storeDataId,1,function()
PrivilegeManager.RefreshPrivilegeUsedTimes(self.trailData.buyTimeId, 1)
MonsterCampManager.ExecuteFightBattle(self.data.wave,2,function()
PrivilegeManager.RefreshPrivilegeUsedTimes(self.trailData.freeTimeId, 1)
Game.GlobalEvent:DispatchEvent(GameEvent.FourEle.UpdatePri)
self:UpdatePrivilage()
end)
end)
end,"取消","确定")
end
elseif self.data.wave == self.trailData.monsterWave + 1 then
-- if self.data.canFightTime > 0 then
-- UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.FOUR_ELEMENT, self.trailData.fourElementType,self.data.wave)
-- else
-- PopupTipPanel.ShowTip("今日已无可挑战层数!")
-- end
-- else
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.wave)
end
end)
end
-- 初始化奖励显示
function FourElementSingleWave:InitShowReward()
for i = 1 ,#self.rewardList do
self.rewardList[i].gameObject:SetActive(false)
end
for i = 1,#self.rewardData do
if not self.rewardList[i] then
self.rewardList[i] = SubUIManager.Open(SubUIConfig.ItemView, self.rewardGrid.transform)
self.rewardList[i].gameObject:SetActive(false)
end
self.rewardList[i]:OnOpen(false, {self.rewardData[i].id,self.rewardData[i].num}, 0.65,false,false,false)
self.rewardList[i].gameObject:SetActive(true)
end
end
--设置每条英雄数据
function FourElementSingleWave:SingleHeroDataShow(monConfig,heroData)
self.frame.sprite=Util.LoadSprite(GetHeroCardStarBg[monConfig.Star])
-- local liveName = heroData.live
-- local roleConfig = ConfigManager.GetConfigData(ConfigName.RoleConfig, heroData.heroConfig.Id)
-- local scale = roleConfig.play_liveScale
-- local livePos = Vector3.New(roleConfig.offset[1], roleConfig.offset[2], 0)
-- self.icon.texture = CardRendererManager.GetSpineTexture(1, liveName, Vector3.one * scale, livePos, true)
-- self.icon.transform.localScale = Vector3.one
-- self.icon.transform.localPosition = Vector3.zero
self.lv.text = monConfig.Level
self.pro.sprite= Util.LoadSprite(GetProStrImageByProNum(heroData.property))
self.icon.sprite = Util.LoadSprite(heroData.painting)
SetCardStars(self.starGrid,monConfig.Star)
self.fg.sprite = Util.LoadSprite(GetHeroCardStarFg[monConfig.Star])
self.name.text = heroData.name
end
function FourElementSingleWave:UpdatePrivilage(rewardShow)
self.storeDataId,self.itemId,self.costNum = MonsterCampManager.GetCost(self.trailData.fourElementType)
self.freeTimes,self.buyTimes = MonsterCampManager.GetTimeTip(self.trailData.fourElementType)
self:SetIcon()
end
function FourElementSingleWave:SetIcon()
if self.data.wave == self.trailData.monsterWave then
self.rewardData = self.data.commonReward
--设置扫荡按钮
self.rewardText.text = "扫荡奖励"
self.fightBtnMask.sprite = Util.LoadSprite("r_chouka_button_002")
if self.freeTimes > 0 then
self.fightBtnText.text = "免费扫荡"
else
self.fightBtnIcon.gameObject:SetActive(true)
self.fightBtnNum.gameObject:SetActive(true)
self.fightBtnIcon.sprite = Util.LoadSprite(GetResourcePath(itemConfig[self.itemId]))
local color = 0
if BagManager.GetItemCountById(self.itemId) < self.costNum then
color = "E71515"
else
color = "17232A"
end
self.fightBtnNum.text =string.format("<color=#%s>%s</color>",color,self.costNum)
self.fightBtnText.text = "扫荡"
if self.buyTimes < 1 then
Util.SetGray(self.fightBtn,true)
end
end
else
self.rewardData = self.data.firstReward
if self.data.wave == self.trailData.monsterWave + 1 then
--设置挑战fight
self.fightBtnMask:GetComponent("Image").sprite = Util.LoadSprite("r_chouka_button_001")
self.fightBtnText.text = "挑战"
else
self.fight.gameObject:SetActive(false)
end
end
end
--界面销毁时调用(用于子类重写)
function FourElementSingleWave:OnDestroy()
self.rewardList = {}
end
function FourElementSingleWave:NewItemView(config, gameObject, ...)
local view = reimport(config.script)
local sub = view:New(gameObject)
sub.assetName = config.assetName
if sub.Awake then
sub:Awake()
end
if sub.InitComponent then
sub:InitComponent()
end
if sub.BindEvent then
sub:BindEvent()
end
if sub.AddListener then
sub:AddListener()
end
if sub.Update then
UpdateBeat:Add(sub.Update, sub)
end
if sub.OnOpen then
sub:OnOpen(...)
end
return sub
end
return FourElementSingleWave

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 48df6468e280cef4c91675e4dbc8cd5f
timeCreated: 1546585413
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: