New custom icon system (not fully done yet)
This commit is contained in:
@@ -104,6 +104,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -348,6 +349,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -412,7 +414,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &3698174834060150289
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -752,6 +754,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -1171,6 +1174,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -1817,6 +1821,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -1955,6 +1960,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -2212,6 +2218,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -2363,6 +2370,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -2478,7 +2486,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: dbf71fe5f2caad1409da64bdbb781eb5, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 517f61beffc1245a0a3f7907c7c93eb0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -2680,6 +2688,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -2893,6 +2902,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -3263,6 +3273,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -3634,6 +3645,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -3787,6 +3799,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -4018,6 +4031,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -4427,6 +4441,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -4973,6 +4988,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -5110,6 +5126,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -5342,6 +5359,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -5598,6 +5616,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -5909,6 +5928,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -6306,6 +6326,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -6443,6 +6464,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -6594,6 +6616,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -7025,6 +7048,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -7176,6 +7200,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 256
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -7329,6 +7354,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 1024
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -7559,6 +7585,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -7712,6 +7739,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -7917,6 +7945,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -8068,6 +8097,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 256
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -8300,6 +8330,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -8452,6 +8483,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -8664,6 +8696,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -8891,6 +8924,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
@@ -9107,6 +9141,7 @@ MonoBehaviour:
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
|
||||
BIN
Assets/Resources/Other/Loading.png
Normal file
BIN
Assets/Resources/Other/Loading.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
195
Assets/Resources/Other/Loading.png.meta
Normal file
195
Assets/Resources/Other/Loading.png.meta
Normal file
@@ -0,0 +1,195 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 517f61beffc1245a0a3f7907c7c93eb0
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -1134032105938053371
|
||||
second: Loading_0
|
||||
- first:
|
||||
213: -5715818429344116891
|
||||
second: Loading_1
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
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
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: Loading_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 11
|
||||
y: 11
|
||||
width: 105
|
||||
height: 54
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 5079ca9decb1340f0800000000000000
|
||||
internalID: -1134032105938053371
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Loading_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 12
|
||||
y: 63
|
||||
width: 105
|
||||
height: 54
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 56f00561c655da0b0800000000000000
|
||||
internalID: -5715818429344116891
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 1537655665
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
Loading_0: -1134032105938053371
|
||||
Loading_1: -5715818429344116891
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1263,7 +1263,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 528764918}
|
||||
m_Material: {fileID: 1481530722}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -2658,7 +2658,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 1268332476}
|
||||
m_Material: {fileID: 1079910495}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -4314,7 +4314,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 6534417478244952628, guid: dbf71fe5f2caad1409da64bdbb781eb5, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 517f61beffc1245a0a3f7907c7c93eb0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -4923,47 +4923,6 @@ MonoBehaviour:
|
||||
invert: 0
|
||||
addMore: {r: 0.40784314, g: 0.40784314, b: 0.40784314, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!21 &528764918
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UI/RoundedCorners/RoundedCorners
|
||||
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _OuterUV: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _WidthHeightRadius: {r: 30, g: 200, b: 10, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!1 &529729328
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5992,47 +5951,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 727840300}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!21 &758879354
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UI/RoundedCorners/RoundedCorners
|
||||
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _OuterUV: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _WidthHeightRadius: {r: 30, g: 200, b: 10, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!1 &773616055
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -6084,7 +6002,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 1883750993}
|
||||
m_Material: {fileID: 1525854425}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -6587,7 +6505,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 758879354}
|
||||
m_Material: {fileID: 1466303730}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -7500,6 +7418,47 @@ MonoBehaviour:
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!21 &1079910495
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UI/RoundedCorners/RoundedCorners
|
||||
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _OuterUV: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _WidthHeightRadius: {r: 200, g: 200, b: 10, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!1 &1098647304
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -8529,47 +8488,6 @@ MonoBehaviour:
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!21 &1268332476
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UI/RoundedCorners/RoundedCorners
|
||||
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _OuterUV: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _WidthHeightRadius: {r: 200, g: 200, b: 10, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!1 &1275335463
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -9795,6 +9713,88 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::WebsocketHandler
|
||||
_Connection: {fileID: 0}
|
||||
--- !u!21 &1466303730
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UI/RoundedCorners/RoundedCorners
|
||||
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _OuterUV: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _WidthHeightRadius: {r: 30, g: 200, b: 10, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!21 &1481530722
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UI/RoundedCorners/RoundedCorners
|
||||
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _OuterUV: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _WidthHeightRadius: {r: 30, g: 200, b: 10, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!1 &1482403541
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -10242,6 +10242,47 @@ MonoBehaviour:
|
||||
invert: 0
|
||||
addMore: {r: 0.40784314, g: 0.40784314, b: 0.40784314, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!21 &1525854425
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UI/RoundedCorners/RoundedCorners
|
||||
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _OuterUV: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _WidthHeightRadius: {r: 200, g: 200, b: 10, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!1 &1545692392
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -11444,7 +11485,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Sprite: {fileID: 21300000, guid: 517f61beffc1245a0a3f7907c7c93eb0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -12698,47 +12739,6 @@ MonoBehaviour:
|
||||
invert: 0
|
||||
addMore: {r: 0.40784314, g: 0.40784314, b: 0.40784314, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!21 &1883750993
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UI/RoundedCorners/RoundedCorners
|
||||
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _OuterUV: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _WidthHeightRadius: {r: 200, g: 200, b: 10, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!1 &1884762428
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -800,7 +800,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &159578938
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -917,7 +917,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Sprite: {fileID: 21300000, guid: 517f61beffc1245a0a3f7907c7c93eb0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -1232,7 +1232,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &256529377
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1487,7 +1487,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Sprite: {fileID: 21300000, guid: 517f61beffc1245a0a3f7907c7c93eb0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -4018,7 +4018,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1175108947
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4962,7 +4962,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Sprite: {fileID: 21300000, guid: 517f61beffc1245a0a3f7907c7c93eb0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -5517,7 +5517,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1377826547
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5788,7 +5788,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Sprite: {fileID: 21300000, guid: 517f61beffc1245a0a3f7907c7c93eb0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -6355,7 +6355,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1500413898
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -8710,7 +8710,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Sprite: {fileID: 21300000, guid: 517f61beffc1245a0a3f7907c7c93eb0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
|
||||
@@ -11,6 +11,7 @@ public class BazookaManager : MonoBehaviour
|
||||
{
|
||||
["version"] = "0"
|
||||
};
|
||||
public List<MarketplaceIcon> iconCache = new();
|
||||
|
||||
void Awake()
|
||||
{
|
||||
|
||||
@@ -127,19 +127,10 @@ public class CustomGamePlayer : MonoBehaviour
|
||||
BazookaManager.Instance.SetBirdOverlay(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (customIconData.Selected != null)
|
||||
{
|
||||
foreach (var icon in customIconData.Data)
|
||||
{
|
||||
if (icon.UUID == customIconData.Selected)
|
||||
{
|
||||
Tools.RenderFromBase64(icon.Data, component);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// else if (customIconData.Selected != null)
|
||||
// foreach (var icon in customIconData.Purchased)
|
||||
// if (icon == customIconData.Selected)
|
||||
// Tools.RenderFromBase64(icon, component);
|
||||
|
||||
lastMoveTime = Time.time;
|
||||
UnityEngine.InputSystem.EnhancedTouch.EnhancedTouchSupport.Enable();
|
||||
|
||||
48
Assets/Scripts/CustomIconLoader.cs
Normal file
48
Assets/Scripts/CustomIconLoader.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class CustomIconLoader : MonoBehaviour
|
||||
{
|
||||
public static async void Init(WaitingForCustomIcon[] objects)
|
||||
{
|
||||
var iconsToDownload = new HashSet<string>();
|
||||
foreach (var obj in objects)
|
||||
if (!BazookaManager.Instance.iconCache.Any(icon => icon.ID == obj.ID))
|
||||
iconsToDownload.Add(obj.ID);
|
||||
|
||||
if (iconsToDownload.Count != 0)
|
||||
{
|
||||
var ids = string.Join(",", iconsToDownload.Select(id => $"\"{id}\""));
|
||||
using UnityWebRequest request = UnityWebRequest.Get(Endpoints.ICON_MARKETPLACE_ICON_ENDPOINT + $"?ids=[{ids}]");
|
||||
request.SetRequestHeader("Requester", "BerryDashClient");
|
||||
request.SetRequestHeader("ClientVersion", Application.version);
|
||||
request.SetRequestHeader("ClientPlatform", Application.platform.ToString());
|
||||
await request.SendWebRequest();
|
||||
if (request.downloadHandler.text == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var jsonResponse = JObject.Parse(request.downloadHandler.text);
|
||||
if ((bool)jsonResponse["success"])
|
||||
{
|
||||
var icons = jsonResponse["data"].ToObject<MarketplaceTempIcon[]>();
|
||||
foreach (var icon in icons) BazookaManager.Instance.iconCache.Add(new MarketplaceIcon { ID = icon.ID, Data = icon.Data });
|
||||
}
|
||||
Debug.Log($"Downloaded {iconsToDownload.Count} custom icons");
|
||||
}
|
||||
|
||||
foreach (var obj in objects)
|
||||
{
|
||||
var cachedIcon = BazookaManager.Instance.iconCache.FirstOrDefault(icon => icon.ID == obj.ID);
|
||||
if (cachedIcon != null)
|
||||
{
|
||||
Tools.RenderFromBase64(Tools.FixIconData(cachedIcon.Data).Item1, obj.GetComponent<Image>());
|
||||
}
|
||||
Destroy(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/CustomIconLoader.cs.meta
Normal file
2
Assets/Scripts/CustomIconLoader.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b4dc3e4328e94d9c89e5c6c0582fca6
|
||||
@@ -115,19 +115,10 @@ public class GamePlayer : MonoBehaviour
|
||||
BazookaManager.Instance.SetBirdOverlay(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (customIconData.Selected != null)
|
||||
{
|
||||
foreach (var icon in customIconData.Data)
|
||||
{
|
||||
if (icon.UUID == customIconData.Selected)
|
||||
{
|
||||
Tools.RenderFromBase64(icon.Data, component);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// else if (customIconData.Selected != null)
|
||||
// foreach (var icon in customIconData.Purchased)
|
||||
// if (icon == customIconData.Selected)
|
||||
// Tools.RenderFromBase64(icon, component);
|
||||
|
||||
lastMoveTime = Time.time;
|
||||
UnityEngine.InputSystem.EnhancedTouch.EnhancedTouchSupport.Enable();
|
||||
|
||||
@@ -129,9 +129,9 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
}
|
||||
}
|
||||
var currentIcons = new JArray();
|
||||
foreach (var icon in BazookaManager.Instance.GetCustomBirdIconData().Data)
|
||||
foreach (var icon in BazookaManager.Instance.GetCustomBirdIconData().Purchased)
|
||||
{
|
||||
currentIcons.Add(icon.UUID);
|
||||
currentIcons.Add(icon);
|
||||
}
|
||||
ShowStatus("Loading...");
|
||||
WWWForm dataForm = new();
|
||||
@@ -160,14 +160,14 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
}
|
||||
ShowStatus(null);
|
||||
var jsonResponse = JObject.Parse(request.downloadHandler.text);
|
||||
var icons = JsonConvert.DeserializeObject<MarketplaceIconType[]>(jsonResponse["data"].ToString());
|
||||
var icons = JsonConvert.DeserializeObject<MarketplaceTempIcon[]>(jsonResponse["data"].ToString());
|
||||
var localUserID = BazookaManager.Instance.GetAccountID();
|
||||
foreach (var entry in icons)
|
||||
{
|
||||
GameObject newIcon = Instantiate(sample, content.transform);
|
||||
newIcon.name = "IconEntry";
|
||||
|
||||
Tools.RenderFromBase64(entry.Data, newIcon.transform.GetChild(0).GetChild(0).GetComponent<Image>());
|
||||
Tools.RenderFromBase64(Tools.FixIconData(entry.Data).Item1, newIcon.transform.GetChild(0).GetChild(0).GetComponent<Image>());
|
||||
newIcon.transform.GetChild(1).GetComponent<TMP_Text>().text = "Bird Name: " + entry.Name;
|
||||
newIcon.transform.GetChild(2).GetComponent<TMP_Text>().text = "Price " + Tools.FormatWithCommas(entry.Price) + " coins";
|
||||
newIcon.transform.GetChild(3).GetComponent<TMP_Text>().text = "Designer Name: " + entry.CreatorUsername;
|
||||
@@ -187,7 +187,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
HandlePurchase(entry, buybtn, sellbtn, localUserID);
|
||||
Tools.RefreshHierarchy(newIcon);
|
||||
});
|
||||
bool alreadyBought = BazookaManager.Instance.GetCustomBirdIconData().Data.Any(d => d.UUID == entry.UUID);
|
||||
bool alreadyBought = BazookaManager.Instance.GetCustomBirdIconData().Purchased.Any(d => d == entry.ID);
|
||||
if (alreadyBought)
|
||||
{
|
||||
buybtn.interactable = false;
|
||||
@@ -221,7 +221,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
backButton.interactable = true;
|
||||
}
|
||||
|
||||
void HandlePurchase(MarketplaceIconType data, Button button, Button sellButton, BigInteger? localUserID)
|
||||
void HandlePurchase(MarketplaceTempIcon data, Button button, Button sellButton, BigInteger? localUserID)
|
||||
{
|
||||
button.interactable = false;
|
||||
MarketplaceIconStorageType marketplaceIconStorage = BazookaManager.Instance.GetCustomBirdIconData();
|
||||
@@ -237,9 +237,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
iconPurchaseSound.Stop();
|
||||
iconPurchaseSound.Play();
|
||||
}
|
||||
var list = marketplaceIconStorage.Data.ToList();
|
||||
list.Add(data);
|
||||
marketplaceIconStorage.Data = list.ToArray();
|
||||
marketplaceIconStorage.Purchased.Add(data.ID);
|
||||
if (localUserID != data.CreatorUserID)
|
||||
{
|
||||
button.transform.GetChild(0).GetComponent<TMP_Text>().text = "Purchased";
|
||||
@@ -253,29 +251,21 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
BazookaManager.Instance.SetCustomBirdIconData(marketplaceIconStorage);
|
||||
}
|
||||
|
||||
void HandleSell(MarketplaceIconType data, Button buyBtn, TMP_Text buyttnText, Button sellButton, BigInteger? localUserID)
|
||||
void HandleSell(MarketplaceTempIcon data, Button buyBtn, TMP_Text buyttnText, Button sellButton, BigInteger? localUserID)
|
||||
{
|
||||
MarketplaceIconStorageType marketplaceIconStorage = BazookaManager.Instance.GetCustomBirdIconData();
|
||||
var list = marketplaceIconStorage.Data.ToList();
|
||||
var owned = list.FirstOrDefault(d => d.UUID == data.UUID);
|
||||
if (owned != null)
|
||||
var owned = marketplaceIconStorage.Purchased.Contains(data.ID);
|
||||
if (owned)
|
||||
{
|
||||
list.Remove(owned);
|
||||
marketplaceIconStorage.Data = list.ToArray();
|
||||
marketplaceIconStorage.Purchased.Remove(data.ID);
|
||||
marketplaceIconStorage.Balance += data.Price;
|
||||
if (data.UUID == marketplaceIconStorage.Selected) marketplaceIconStorage.Selected = null;
|
||||
if (data.ID == marketplaceIconStorage.Selected) marketplaceIconStorage.Selected = null;
|
||||
iconPurchaseSound.Stop();
|
||||
iconPurchaseSound.Play();
|
||||
balanceText.text = Tools.FormatWithCommas(marketplaceIconStorage.Balance);
|
||||
BazookaManager.Instance.SetCustomBirdIconData(marketplaceIconStorage);
|
||||
if (localUserID != data.CreatorUserID)
|
||||
{
|
||||
buyttnText.text = "Purchase";
|
||||
}
|
||||
else
|
||||
{
|
||||
buyttnText.text = "Claim";
|
||||
}
|
||||
if (localUserID != data.CreatorUserID) buyttnText.text = "Purchase";
|
||||
else buyttnText.text = "Claim";
|
||||
buyBtn.interactable = true;
|
||||
sellButton.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
@@ -20,25 +21,22 @@ public class Iconsmenu : MonoBehaviour
|
||||
[SerializeField] private Image previewOverlay;
|
||||
[SerializeField] private Button[] icons;
|
||||
[SerializeField] private Button[] overlays;
|
||||
private Dictionary<string, Button> customIcons = new();
|
||||
[SerializeField] private GameObject previewBirdObject;
|
||||
[SerializeField] private ColorPanel iconColorPanel;
|
||||
[SerializeField] private ColorPanel overlayColorPanel;
|
||||
private Dictionary<string, Button> customIcons = new();
|
||||
|
||||
private void Start()
|
||||
{
|
||||
var customIconData = BazookaManager.Instance.GetCustomBirdIconData();
|
||||
foreach (var icon in customIconData.Data)
|
||||
foreach (var icon in customIconData.Purchased)
|
||||
{
|
||||
var iconEntry = Instantiate(marketplaceIconsSample, marketplaceIconsContent.transform);
|
||||
iconEntry.name = "MarketplaceIcon";
|
||||
var button = iconEntry.GetComponent<Button>();
|
||||
customIcons[icon.UUID] = button;
|
||||
button.onClick.AddListener(() =>
|
||||
{
|
||||
SelectCustomIcon(icon);
|
||||
});
|
||||
Tools.RenderFromBase64(icon.Data, iconEntry.transform.GetChild(0).GetComponent<Image>());
|
||||
customIcons[icon] = button;
|
||||
button.onClick.AddListener(() => SelectCustomIcon(icon));
|
||||
iconEntry.transform.GetChild(0).AddComponent<WaitingForCustomIcon>().ID = icon;
|
||||
iconEntry.SetActive(true);
|
||||
}
|
||||
iconColorPanel.Init(customIconData.Selected == null ? BazookaManager.Instance.GetColorSettingIcon() : JArray.Parse("[255,255,255]"), Color.white);
|
||||
@@ -46,13 +44,11 @@ public class Iconsmenu : MonoBehaviour
|
||||
{
|
||||
BazookaManager.Instance.SetColorSettingIcon(color);
|
||||
foreach (var icon in icons)
|
||||
{
|
||||
icon.transform.GetChild(0).GetComponent<Image>().color = new Color(
|
||||
int.Parse(color[0].ToString()) / 255f,
|
||||
int.Parse(color[1].ToString()) / 255f,
|
||||
int.Parse(color[2].ToString()) / 255f
|
||||
);
|
||||
}
|
||||
};
|
||||
overlayColorPanel.Init(customIconData.Selected == null ? BazookaManager.Instance.GetColorSettingOverlay() : JArray.Parse("[255,255,255]"), Color.white);
|
||||
overlayColorPanel.OnColorChanged += color =>
|
||||
@@ -86,22 +82,12 @@ public class Iconsmenu : MonoBehaviour
|
||||
placeholderButton.interactable = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SwitchToMarketplaceIcons();
|
||||
}
|
||||
else SwitchToMarketplaceIcons();
|
||||
placeholderButton.onClick.AddListener(ToggleKit);
|
||||
previewBird.GetComponentInParent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
var scale = previewBird.transform.localScale;
|
||||
if (scale.x == -1)
|
||||
{
|
||||
scale.x = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
scale.x = -1;
|
||||
}
|
||||
scale.x = scale.x == -1 ? 1 : -1;
|
||||
previewBird.transform.localScale = scale;
|
||||
});
|
||||
for (int i = 0; i < icons.Length; i++)
|
||||
@@ -148,28 +134,20 @@ public class Iconsmenu : MonoBehaviour
|
||||
var customIconData = BazookaManager.Instance.GetCustomBirdIconData();
|
||||
foreach (var btn in customIcons.Values) btn.interactable = true;
|
||||
if (customIconData.Selected != null)
|
||||
{
|
||||
foreach (var icon in customIconData.Data)
|
||||
foreach (var icon in customIconData.Purchased)
|
||||
{
|
||||
if (icon.UUID == customIconData.Selected)
|
||||
{
|
||||
SelectCustomIcon(icon);
|
||||
}
|
||||
customIcons[icon.UUID].interactable = icon.UUID != customIconData.Selected;
|
||||
if (icon == customIconData.Selected) SelectCustomIcon(icon);
|
||||
customIcons[icon].interactable = icon != customIconData.Selected;
|
||||
}
|
||||
}
|
||||
|
||||
var objects = FindObjectsByType<WaitingForCustomIcon>(FindObjectsSortMode.None);
|
||||
if (objects.Length != 0) CustomIconLoader.Init(objects);
|
||||
}
|
||||
|
||||
private void ToggleKit()
|
||||
{
|
||||
if (GetCurrentKit() == 1)
|
||||
{
|
||||
SwitchToOverlay();
|
||||
}
|
||||
else if (GetCurrentKit() == 2)
|
||||
{
|
||||
SwitchToMarketplaceIcons();
|
||||
}
|
||||
if (GetCurrentKit() == 1) SwitchToOverlay();
|
||||
else if (GetCurrentKit() == 2) SwitchToMarketplaceIcons();
|
||||
else if (GetCurrentKit() == 3)
|
||||
{
|
||||
defaultIcon = Tools.GetIconForUser(BazookaManager.Instance.GetAccountID() ?? 0);
|
||||
@@ -191,18 +169,9 @@ public class Iconsmenu : MonoBehaviour
|
||||
|
||||
private int GetCurrentKit()
|
||||
{
|
||||
if (iconsPanel.activeSelf)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (overlaysPanel.activeSelf)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
if (marketplaceIconsPanel.activeSelf)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
if (iconsPanel.activeSelf) return 1;
|
||||
else if (overlaysPanel.activeSelf) return 2;
|
||||
else if (marketplaceIconsPanel.activeSelf) return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -213,23 +182,15 @@ public class Iconsmenu : MonoBehaviour
|
||||
BazookaManager.Instance.SetCustomBirdIconData(customData);
|
||||
BazookaManager.Instance.SetBirdIcon(iconID);
|
||||
for (int i = 0; i < icons.Length; i++)
|
||||
{
|
||||
icons[i].interactable = iconID != i + 1;
|
||||
}
|
||||
previewBird.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + iconID);
|
||||
if (iconID == 1)
|
||||
{
|
||||
previewBird.sprite = defaultIcon;
|
||||
}
|
||||
if (iconID == 1) previewBird.sprite = defaultIcon;
|
||||
if (iconID == 7)
|
||||
{
|
||||
SelectOverlay(0);
|
||||
placeholderButton.interactable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
placeholderButton.interactable = true;
|
||||
}
|
||||
else placeholderButton.interactable = true;
|
||||
}
|
||||
|
||||
private void SelectOverlay(int overlayID)
|
||||
@@ -244,43 +205,33 @@ public class Iconsmenu : MonoBehaviour
|
||||
}
|
||||
previewOverlay.rectTransform.localPosition = new Vector3(-32f, 44.50001f, 0f);
|
||||
previewOverlay.gameObject.SetActive(true);
|
||||
if (overlayID == 8)
|
||||
{
|
||||
previewOverlay.rectTransform.localPosition = new Vector3(-35.36f, 31.6f, 0f);
|
||||
}
|
||||
else if (overlayID == 11)
|
||||
{
|
||||
previewOverlay.rectTransform.localPosition = new Vector3(-31.44f, 43.50004f, 0f);
|
||||
}
|
||||
else if (overlayID == 13)
|
||||
{
|
||||
previewOverlay.rectTransform.localPosition = new Vector3(-35.28575f, 31.3667f, 0f);
|
||||
}
|
||||
if (overlayID == 8) previewOverlay.rectTransform.localPosition = new Vector3(-35.36f, 31.6f, 0f);
|
||||
else if (overlayID == 11) previewOverlay.rectTransform.localPosition = new Vector3(-31.44f, 43.50004f, 0f);
|
||||
else if (overlayID == 13) previewOverlay.rectTransform.localPosition = new Vector3(-35.28575f, 31.3667f, 0f);
|
||||
|
||||
if (overlayID == 0)
|
||||
{
|
||||
previewOverlay.gameObject.SetActive(false);
|
||||
previewOverlay.sprite = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
previewOverlay.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlayID);
|
||||
}
|
||||
else previewOverlay.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlayID);
|
||||
}
|
||||
|
||||
void SelectCustomIcon(MarketplaceIconType icon)
|
||||
void SelectCustomIcon(string icon)
|
||||
{
|
||||
var customData = BazookaManager.Instance.GetCustomBirdIconData();
|
||||
customData.Selected = icon.UUID;
|
||||
customData.Selected = icon;
|
||||
BazookaManager.Instance.SetCustomBirdIconData(customData);
|
||||
Tools.RenderFromBase64(icon.Data, previewBird);
|
||||
var waitingForCustomIcon = previewBird.AddComponent<WaitingForCustomIcon>();
|
||||
waitingForCustomIcon.ID = icon;
|
||||
CustomIconLoader.Init(new[] { waitingForCustomIcon });
|
||||
previewBird.color = Color.white;
|
||||
previewOverlay.gameObject.SetActive(false);
|
||||
previewOverlay.sprite = null;
|
||||
previewOverlay.color = Color.white;
|
||||
foreach (var loopIcon in customData.Data)
|
||||
foreach (var loopIcon in customData.Purchased)
|
||||
{
|
||||
customIcons[loopIcon.UUID].interactable = loopIcon.UUID != icon.UUID;
|
||||
customIcons[loopIcon].interactable = loopIcon != icon;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,8 +44,6 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
[SerializeField] private GameObject totalBerriesContent;
|
||||
[SerializeField] private GameObject totalBerriesSampleObject;
|
||||
|
||||
[SerializeField] private Dictionary<string, string> customIcons;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
selectionScoreButton.onClick.AddListener(() => SwitchMenu(1));
|
||||
@@ -222,8 +220,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
var jsonResponse = JObject.Parse(response);
|
||||
if ((bool)jsonResponse["success"])
|
||||
{
|
||||
var entries = (JObject)jsonResponse["data"]["entries"];
|
||||
customIcons = jsonResponse["data"]["customIcons"].ToObject<Dictionary<string, string>>();
|
||||
var entries = (JObject)jsonResponse["data"];
|
||||
foreach (var prop in entries.Properties())
|
||||
{
|
||||
JObject entry = (JObject)prop.Value;
|
||||
@@ -255,27 +252,12 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
if (customIcon == null)
|
||||
{
|
||||
playerIcon.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
if (icon == 1)
|
||||
{
|
||||
playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
}
|
||||
if (icon == 1) playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
playerOverlayIcon.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlay);
|
||||
if (overlay == 0)
|
||||
{
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else if (overlay == 8)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
}
|
||||
else if (overlay == 11)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
}
|
||||
else if (overlay == 13)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
}
|
||||
if (overlay != 0) playerOverlayIcon.gameObject.SetActive(true);
|
||||
if (overlay == 8) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
else if (overlay == 11) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
else if (overlay == 13) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
try
|
||||
{
|
||||
playerIcon.color = new Color((int)birdColor[0] / 255f, (int)birdColor[1] / 255f, (int)birdColor[2] / 255f);
|
||||
@@ -287,11 +269,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
playerOverlayIcon.color = Color.white;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Tools.RenderFromBase64(customIcons[customIcon], playerIcon);
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else playerIcon.gameObject.AddComponent<WaitingForCustomIcon>().ID = customIcon;
|
||||
playerIconButton.onClick.AddListener(async () =>
|
||||
{
|
||||
var clone = Instantiate(profilePrefab.gameObject, profilePrefab.gameObject.transform.parent);
|
||||
@@ -300,6 +278,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
});
|
||||
entryInfo.SetActive(true);
|
||||
}
|
||||
CustomIconLoader.Init(FindObjectsByType<WaitingForCustomIcon>(FindObjectsSortMode.None));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -346,8 +325,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
var jsonResponse = JObject.Parse(response);
|
||||
if ((bool)jsonResponse["success"])
|
||||
{
|
||||
var entries = (JObject)jsonResponse["data"]["entries"];
|
||||
customIcons = jsonResponse["data"]["customIcons"].ToObject<Dictionary<string, string>>();
|
||||
var entries = (JObject)jsonResponse["data"];
|
||||
foreach (var prop in entries.Properties())
|
||||
{
|
||||
JObject entry = (JObject)prop.Value;
|
||||
@@ -379,27 +357,12 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
if (customIcon == null)
|
||||
{
|
||||
playerIcon.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
if (icon == 1)
|
||||
{
|
||||
playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
}
|
||||
if (icon == 1) playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
playerOverlayIcon.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlay);
|
||||
if (overlay == 0)
|
||||
{
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else if (overlay == 8)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
}
|
||||
else if (overlay == 11)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
}
|
||||
else if (overlay == 13)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
}
|
||||
if (overlay != 0) playerOverlayIcon.gameObject.SetActive(true);
|
||||
if (overlay == 8) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
else if (overlay == 11) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
else if (overlay == 13) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
try
|
||||
{
|
||||
playerIcon.color = new Color((int)birdColor[0] / 255f, (int)birdColor[1] / 255f, (int)birdColor[2] / 255f);
|
||||
@@ -411,11 +374,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
playerOverlayIcon.color = Color.white;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Tools.RenderFromBase64(customIcons[customIcon], playerIcon);
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else playerIcon.gameObject.AddComponent<WaitingForCustomIcon>().ID = customIcon;
|
||||
playerIconButton.onClick.AddListener(async () =>
|
||||
{
|
||||
var clone = Instantiate(profilePrefab.gameObject, profilePrefab.gameObject.transform.parent);
|
||||
@@ -424,6 +383,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
});
|
||||
entryInfo.SetActive(true);
|
||||
}
|
||||
CustomIconLoader.Init(FindObjectsByType<WaitingForCustomIcon>(FindObjectsSortMode.None));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -470,8 +430,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
var jsonResponse = JObject.Parse(response);
|
||||
if ((bool)jsonResponse["success"])
|
||||
{
|
||||
var entries = (JObject)jsonResponse["data"]["entries"];
|
||||
customIcons = jsonResponse["data"]["customIcons"].ToObject<Dictionary<string, string>>();
|
||||
var entries = (JObject)jsonResponse["data"];
|
||||
foreach (var prop in entries.Properties())
|
||||
{
|
||||
JObject entry = (JObject)prop.Value;
|
||||
@@ -503,27 +462,12 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
if (customIcon == null)
|
||||
{
|
||||
playerIcon.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
if (icon == 1)
|
||||
{
|
||||
playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
}
|
||||
if (icon == 1) playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
playerOverlayIcon.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlay);
|
||||
if (overlay == 0)
|
||||
{
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else if (overlay == 8)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
}
|
||||
else if (overlay == 11)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
}
|
||||
else if (overlay == 13)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
}
|
||||
if (overlay != 0) playerOverlayIcon.gameObject.SetActive(true);
|
||||
if (overlay == 8) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
else if (overlay == 11) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
else if (overlay == 13) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
try
|
||||
{
|
||||
playerIcon.color = new Color((int)birdColor[0] / 255f, (int)birdColor[1] / 255f, (int)birdColor[2] / 255f);
|
||||
@@ -535,11 +479,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
playerOverlayIcon.color = Color.white;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Tools.RenderFromBase64(customIcons[customIcon], playerIcon);
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else playerIcon.gameObject.AddComponent<WaitingForCustomIcon>().ID = customIcon;
|
||||
playerIconButton.onClick.AddListener(async () =>
|
||||
{
|
||||
var clone = Instantiate(profilePrefab.gameObject, profilePrefab.gameObject.transform.parent);
|
||||
@@ -548,6 +488,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
});
|
||||
entryInfo.SetActive(true);
|
||||
}
|
||||
CustomIconLoader.Init(FindObjectsByType<WaitingForCustomIcon>(FindObjectsSortMode.None));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -593,8 +534,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
var jsonResponse = JObject.Parse(response);
|
||||
if ((bool)jsonResponse["success"])
|
||||
{
|
||||
var entries = (JObject)jsonResponse["data"]["entries"];
|
||||
customIcons = jsonResponse["data"]["customIcons"].ToObject<Dictionary<string, string>>();
|
||||
var entries = (JObject)jsonResponse["data"];
|
||||
foreach (var prop in entries.Properties())
|
||||
{
|
||||
JObject entry = (JObject)prop.Value;
|
||||
@@ -626,27 +566,12 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
if (customIcon == null)
|
||||
{
|
||||
playerIcon.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
if (icon == 1)
|
||||
{
|
||||
playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
}
|
||||
if (icon == 1) playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
playerOverlayIcon.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlay);
|
||||
if (overlay == 0)
|
||||
{
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else if (overlay == 8)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
}
|
||||
else if (overlay == 11)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
}
|
||||
else if (overlay == 13)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
}
|
||||
if (overlay != 0) playerOverlayIcon.gameObject.SetActive(true);
|
||||
if (overlay == 8) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
else if (overlay == 11) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
else if (overlay == 13) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
try
|
||||
{
|
||||
playerIcon.color = new Color((int)birdColor[0] / 255f, (int)birdColor[1] / 255f, (int)birdColor[2] / 255f);
|
||||
@@ -658,11 +583,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
playerOverlayIcon.color = Color.white;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Tools.RenderFromBase64(customIcons[customIcon], playerIcon);
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else playerIcon.gameObject.AddComponent<WaitingForCustomIcon>().ID = customIcon;
|
||||
playerIconButton.onClick.AddListener(async () =>
|
||||
{
|
||||
var clone = Instantiate(profilePrefab.gameObject, profilePrefab.gameObject.transform.parent);
|
||||
@@ -671,6 +592,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
});
|
||||
entryInfo.SetActive(true);
|
||||
}
|
||||
CustomIconLoader.Init(FindObjectsByType<WaitingForCustomIcon>(FindObjectsSortMode.None));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -718,8 +640,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
var jsonResponse = JObject.Parse(response);
|
||||
if ((bool)jsonResponse["success"])
|
||||
{
|
||||
var entries = (JObject)jsonResponse["data"]["entries"];
|
||||
customIcons = jsonResponse["data"]["customIcons"].ToObject<Dictionary<string, string>>();
|
||||
var entries = (JObject)jsonResponse["data"];
|
||||
foreach (var prop in entries.Properties())
|
||||
{
|
||||
JObject entry = (JObject)prop.Value;
|
||||
@@ -751,27 +672,12 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
if (customIcon == null)
|
||||
{
|
||||
playerIcon.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
if (icon == 1)
|
||||
{
|
||||
playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
}
|
||||
if (icon == 1) playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
playerOverlayIcon.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlay);
|
||||
if (overlay == 0)
|
||||
{
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else if (overlay == 8)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
}
|
||||
else if (overlay == 11)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
}
|
||||
else if (overlay == 13)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
}
|
||||
if (overlay != 0) playerOverlayIcon.gameObject.SetActive(true);
|
||||
if (overlay == 8) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
else if (overlay == 11) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
else if (overlay == 13) playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
try
|
||||
{
|
||||
playerIcon.color = new Color((int)birdColor[0] / 255f, (int)birdColor[1] / 255f, (int)birdColor[2] / 255f);
|
||||
@@ -783,11 +689,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
playerOverlayIcon.color = Color.white;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Tools.RenderFromBase64(customIcons[customIcon], playerIcon);
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else playerIcon.gameObject.AddComponent<WaitingForCustomIcon>().ID = customIcon;
|
||||
playerIconButton.onClick.AddListener(async () =>
|
||||
{
|
||||
var clone = Instantiate(profilePrefab.gameObject, profilePrefab.gameObject.transform.parent);
|
||||
@@ -796,6 +698,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
});
|
||||
entryInfo.SetActive(true);
|
||||
}
|
||||
CustomIconLoader.Init(FindObjectsByType<WaitingForCustomIcon>(FindObjectsSortMode.None));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ public class Endpoints
|
||||
public static readonly string PROFILE_POSTS_ENDPOINT = PROFILE_ENDPOINT + "/posts";
|
||||
public static readonly string ICON_MARKETPLACE_ENDPOINT = BERRYDASH_ENDPOINT + "/icon-marketplace";
|
||||
public static readonly string ICON_MARKETPLACE_UPLOAD_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/upload";
|
||||
public static readonly string ICON_MARKETPLACE_ICON_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/icon";
|
||||
public static readonly string ACCOUNT_ENDPOINT = BERRYDASH_ENDPOINT + "/account";
|
||||
public static readonly string ACCOUNT_LOGIN_ENDPOINT = ACCOUNT_ENDPOINT + "/login";
|
||||
public static readonly string ACCOUNT_REGISTER_ENDPOINT = ACCOUNT_ENDPOINT + "/register";
|
||||
|
||||
@@ -56,11 +56,11 @@ public class ProfileMenu : MonoBehaviour
|
||||
string coins,
|
||||
string playerName,
|
||||
BigInteger playerID,
|
||||
int playerIcon,
|
||||
int playerOverlay,
|
||||
string customIcon,
|
||||
int? playerIcon,
|
||||
int? playerOverlay,
|
||||
Color playerIconColor,
|
||||
Color playerOverlayColor
|
||||
Color playerOverlayColor,
|
||||
string customIcon
|
||||
)
|
||||
{
|
||||
normalBerryStat.text = normalBerries;
|
||||
@@ -77,34 +77,20 @@ public class ProfileMenu : MonoBehaviour
|
||||
if (customIcon == null)
|
||||
{
|
||||
playerIconImage.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + playerIcon);
|
||||
if (playerIcon == 1)
|
||||
{
|
||||
playerIconImage.sprite = Tools.GetIconForUser(playerID);
|
||||
}
|
||||
if (playerIcon == 1) playerIconImage.sprite = Tools.GetIconForUser(playerID);
|
||||
playerOverlayImage.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + playerOverlay);
|
||||
if (playerOverlay == 0)
|
||||
{
|
||||
playerOverlayImage.gameObject.SetActive(false);
|
||||
}
|
||||
else if (playerOverlay == 8)
|
||||
{
|
||||
playerOverlayImage.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
}
|
||||
else if (playerOverlay == 11)
|
||||
{
|
||||
playerOverlayImage.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
}
|
||||
else if (playerOverlay == 13)
|
||||
{
|
||||
playerOverlayImage.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
}
|
||||
if (playerOverlay != 0) playerOverlayImage.gameObject.SetActive(true);
|
||||
if (playerOverlay == 8) playerOverlayImage.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
else if (playerOverlay == 11) playerOverlayImage.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
else if (playerOverlay == 13) playerOverlayImage.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
playerIconImage.color = playerIconColor;
|
||||
playerOverlayImage.color = playerOverlayColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
Tools.RenderFromBase64(customIcon, playerIconImage);
|
||||
playerOverlayImage.gameObject.SetActive(false);
|
||||
var waitingForCustomIcon = playerIconImage.gameObject.AddComponent<WaitingForCustomIcon>();
|
||||
waitingForCustomIcon.ID = customIcon;
|
||||
CustomIconLoader.Init(new[] { waitingForCustomIcon });
|
||||
}
|
||||
if (BazookaManager.Instance.GetAccountID() == playerID)
|
||||
{
|
||||
@@ -139,8 +125,8 @@ public class ProfileMenu : MonoBehaviour
|
||||
var jsonResponse = JObject.Parse(response);
|
||||
if ((bool)jsonResponse["success"])
|
||||
{
|
||||
var iconColorArray = JArray.Parse(jsonResponse["data"]["iconColor"].Type == JTokenType.Null ? "[255,255,255]" : jsonResponse["data"]["iconColor"].ToString());
|
||||
var overlayColorArray = JArray.Parse(jsonResponse["data"]["overlayColor"].Type == JTokenType.Null ? "[255,255,255]" : jsonResponse["data"]["overlayColor"].ToString());
|
||||
var iconColorArray = jsonResponse["data"]["iconColor"].Type == JTokenType.Null ? new JArray(255, 255, 255) : (JArray)jsonResponse["data"]["iconColor"];
|
||||
var overlayColorArray = jsonResponse["data"]["overlayColor"].Type == JTokenType.Null ? new JArray(255, 255, 255) : (JArray)jsonResponse["data"]["overlayColor"];
|
||||
var iconColor = new Color((int)iconColorArray[0] / 255f, (int)iconColorArray[1] / 255f, (int)iconColorArray[2] / 255f);
|
||||
var overlayColor = new Color((int)overlayColorArray[0] / 255f, (int)overlayColorArray[1] / 255f, (int)overlayColorArray[2] / 255f);
|
||||
await Init(
|
||||
@@ -157,9 +143,9 @@ public class ProfileMenu : MonoBehaviour
|
||||
playerID,
|
||||
int.Parse(jsonResponse["data"]["icon"].Type == JTokenType.Null ? "1" : jsonResponse["data"]["icon"].ToString()),
|
||||
int.Parse(jsonResponse["data"]["overlay"].Type == JTokenType.Null ? "0" : jsonResponse["data"]["overlay"].ToString()),
|
||||
(string)jsonResponse["data"]["customIcon"],
|
||||
iconColor,
|
||||
overlayColor
|
||||
overlayColor,
|
||||
(string)jsonResponse["data"]["customIcon"]
|
||||
);
|
||||
}
|
||||
else
|
||||
@@ -176,19 +162,8 @@ public class ProfileMenu : MonoBehaviour
|
||||
public async Task Init()
|
||||
{
|
||||
var customIconData = BazookaManager.Instance.GetCustomBirdIconData();
|
||||
string customIcon = null;
|
||||
if (customIconData.Selected != null)
|
||||
{
|
||||
foreach (var icon in customIconData.Data)
|
||||
{
|
||||
if (icon.UUID == customIconData.Selected)
|
||||
{
|
||||
customIcon = icon.Data;
|
||||
}
|
||||
}
|
||||
}
|
||||
var iconColor = BazookaManager.Instance.GetColorSettingIcon();
|
||||
var overlayColor = BazookaManager.Instance.GetColorSettingOverlay();
|
||||
var iconColor = customIconData.Selected == null ? BazookaManager.Instance.GetColorSettingIcon() : null;
|
||||
var overlayColor = customIconData.Selected == null ? BazookaManager.Instance.GetColorSettingOverlay() : null;
|
||||
await Init(
|
||||
BazookaManager.Instance.GetGameStoreTotalNormalBerries().ToString(),
|
||||
BazookaManager.Instance.GetGameStoreTotalPoisonBerries().ToString(),
|
||||
@@ -201,11 +176,11 @@ public class ProfileMenu : MonoBehaviour
|
||||
customIconData.Balance.ToString(),
|
||||
BazookaManager.Instance.GetAccountName().ToString(),
|
||||
BazookaManager.Instance.GetAccountID() ?? 0,
|
||||
BazookaManager.Instance.GetBirdIcon(),
|
||||
BazookaManager.Instance.GetBirdOverlay(),
|
||||
customIcon,
|
||||
new Color((int)iconColor[0] / 255f, (int)iconColor[1] / 255f, (int)iconColor[2] / 255f),
|
||||
new Color((int)overlayColor[0] / 255f, (int)overlayColor[1] / 255f, (int)overlayColor[2] / 255f)
|
||||
customIconData.Selected == null ? BazookaManager.Instance.GetBirdIcon() : null,
|
||||
customIconData.Selected == null ? BazookaManager.Instance.GetBirdOverlay() : null,
|
||||
customIconData.Selected == null ? new Color((int)iconColor[0] / 255f, (int)iconColor[1] / 255f, (int)iconColor[2] / 255f) : Color.white,
|
||||
customIconData.Selected == null ? new Color((int)overlayColor[0] / 255f, (int)overlayColor[1] / 255f, (int)overlayColor[2] / 255f) : Color.white,
|
||||
customIconData.Selected
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,38 +8,17 @@ public static class Tools
|
||||
{
|
||||
public static Sprite GetIconForUser(BigInteger user)
|
||||
{
|
||||
if (user == 1)
|
||||
{
|
||||
return Resources.Load<Sprite>("Icons/Icons/bird_-1");
|
||||
}
|
||||
else if (user == 2)
|
||||
{
|
||||
return Resources.Load<Sprite>("Icons/Icons/bird_-2");
|
||||
}
|
||||
else if (user == 4)
|
||||
{
|
||||
return Resources.Load<Sprite>("Icons/Icons/bird_-3");
|
||||
}
|
||||
else if (user == 3)
|
||||
{
|
||||
return Resources.Load<Sprite>("Icons/Icons/bird_-4");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Resources.Load<Sprite>("Icons/Icons/bird_1");
|
||||
}
|
||||
if (user == 1) return Resources.Load<Sprite>("Icons/Icons/bird_-1");
|
||||
else if (user == 2) return Resources.Load<Sprite>("Icons/Icons/bird_-2");
|
||||
else if (user == 4) return Resources.Load<Sprite>("Icons/Icons/bird_-3");
|
||||
else if (user == 3) return Resources.Load<Sprite>("Icons/Icons/bird_-4");
|
||||
else return Resources.Load<Sprite>("Icons/Icons/bird_1");
|
||||
}
|
||||
|
||||
public static string FormatWithCommas(string number)
|
||||
{
|
||||
try
|
||||
{
|
||||
return FormatWithCommas(BigInteger.Parse(number));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return number;
|
||||
}
|
||||
try { return FormatWithCommas(BigInteger.Parse(number)); }
|
||||
catch { return number; }
|
||||
}
|
||||
|
||||
public static string FormatWithCommas(BigInteger number)
|
||||
@@ -84,4 +63,29 @@ public static class Tools
|
||||
foreach (Transform child in root.transform) RefreshHierarchy(child.gameObject);
|
||||
if (root.TryGetComponent<RectTransform>(out var rect)) LayoutRebuilder.ForceRebuildLayoutImmediate(rect);
|
||||
}
|
||||
|
||||
public static (string, string) FixIconData(string i)
|
||||
{
|
||||
int t = i.Length;
|
||||
int h = 128;
|
||||
int d = t - h;
|
||||
int a = d / 4;
|
||||
int b = h / 4;
|
||||
|
||||
string D = string.Concat(
|
||||
i.Substring(0, a),
|
||||
i.Substring(a + b, a),
|
||||
i.Substring(a * 2 + b * 2, a),
|
||||
i.Substring(a * 3 + b * 3, d - a * 3)
|
||||
);
|
||||
|
||||
string H = string.Concat(
|
||||
i.Substring(a, b),
|
||||
i.Substring(a * 2 + b, b),
|
||||
i.Substring(a * 3 + b * 2, b),
|
||||
i.Substring(a * 4 + b * 3, b)
|
||||
);
|
||||
|
||||
return (D, H);
|
||||
}
|
||||
}
|
||||
14
Assets/Scripts/Types/MarketplaceIcon.cs
Normal file
14
Assets/Scripts/Types/MarketplaceIcon.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
[Preserve]
|
||||
public class MarketplaceIcon
|
||||
{
|
||||
[Preserve]
|
||||
[JsonProperty("data")]
|
||||
public string Data { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("id")]
|
||||
public string ID { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -8,6 +8,6 @@ public class MarketplaceIconStorageType
|
||||
public string Selected { get; set; } = null;
|
||||
[JsonProperty("balance")]
|
||||
public BigInteger Balance { get; set; } = 0;
|
||||
[JsonProperty("data")]
|
||||
public MarketplaceIconType[] Data { get; set; } = Array.Empty<MarketplaceIconType>();
|
||||
[JsonProperty("purchased")]
|
||||
public List<string> Purchased { get; set; } = new();
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using Newtonsoft.Json;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
[Preserve]
|
||||
public class MarketplaceIconType
|
||||
public class MarketplaceTempIcon
|
||||
{
|
||||
[Preserve]
|
||||
[JsonProperty("username")]
|
||||
@@ -18,13 +18,17 @@ public class MarketplaceIconType
|
||||
public string Data { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("uuid")]
|
||||
public string UUID { get; set; }
|
||||
[JsonProperty("id")]
|
||||
public string ID { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("price")]
|
||||
public BigInteger Price { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("buyable")]
|
||||
public bool Buyable { get; set; }
|
||||
|
||||
[Preserve]
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
2
Assets/Scripts/Types/MarketplaceTempIcon.cs.meta
Normal file
2
Assets/Scripts/Types/MarketplaceTempIcon.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ee133a71d8c349be9e474bc628e7fe0
|
||||
6
Assets/Scripts/WaitingForCustomIcon.cs
Normal file
6
Assets/Scripts/WaitingForCustomIcon.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class WaitingForCustomIcon : MonoBehaviour
|
||||
{
|
||||
public string ID;
|
||||
}
|
||||
2
Assets/Scripts/WaitingForCustomIcon.cs.meta
Normal file
2
Assets/Scripts/WaitingForCustomIcon.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 096acab2a79074fa19b7b9364378bd6b
|
||||
Reference in New Issue
Block a user