From 4c90ba92c4d1ba5b26db20692577e5a794e76676 Mon Sep 17 00:00:00 2001 From: Ali Sharoz Date: Tue, 5 Nov 2024 13:32:07 +0500 Subject: [PATCH] UnConfirmed Pipe Fix. Pushed for testing. --- Assets/PipeOut/Scenes/HomeScene.unity | 557 +++++++++++++------------- Assets/ShopManager.cs | 59 ++- 2 files changed, 326 insertions(+), 290 deletions(-) diff --git a/Assets/PipeOut/Scenes/HomeScene.unity b/Assets/PipeOut/Scenes/HomeScene.unity index 217c60ec..0a66f898 100644 --- a/Assets/PipeOut/Scenes/HomeScene.unity +++ b/Assets/PipeOut/Scenes/HomeScene.unity @@ -7953,7 +7953,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: $1.99 + m_text: $4.99 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: f9650ff3b67d45e42aa51501d10136f4, type: 2} m_sharedMaterial: {fileID: 2039440194532944411, guid: f9650ff3b67d45e42aa51501d10136f4, @@ -9584,15 +9584,15 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 483516423} m_CullTransparentMesh: 1 ---- !u!21 &498890822 +--- !u!21 &520002277 Material: serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/Shiny_Reflect - m_Shader: {fileID: 4800000, guid: 6fc94ae14d17d3642b09718b5b932fd2, type: 3} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] @@ -9611,23 +9611,16 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _MainTex2: - m_Texture: {fileID: 2800000, guid: 6ed1aafd335608e48aa3198044a161df, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - _Alpha: 0 - _ColorMask: 15 - - _Distortion: -0.5432072 + - _EffectAmount: 1 - _Stencil: 0 - _StencilComp: 8 - _StencilOp: 0 - _StencilReadMask: 255 - _StencilWriteMask: 255 - - _Value2: 0.5 - - _Value3: 1 - - _Value4: 0 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] @@ -10130,7 +10123,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: $1.99 + m_text: $4.99 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: f9650ff3b67d45e42aa51501d10136f4, type: 2} m_sharedMaterial: {fileID: 2039440194532944411, guid: f9650ff3b67d45e42aa51501d10136f4, @@ -10400,7 +10393,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: $1.99 + m_text: $4.99 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: f9650ff3b67d45e42aa51501d10136f4, type: 2} m_sharedMaterial: {fileID: 2039440194532944411, guid: f9650ff3b67d45e42aa51501d10136f4, @@ -10553,6 +10546,53 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 555122868} m_CullTransparentMesh: 1 +--- !u!21 &559606102 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/Shiny_Reflect + m_Shader: {fileID: 4800000, guid: 6fc94ae14d17d3642b09718b5b932fd2, 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} + - _MainTex2: + m_Texture: {fileID: 2800000, guid: 6ed1aafd335608e48aa3198044a161df, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _Distortion: -0.003866583 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _Value2: 0.261 + - _Value3: 0.53 + - _Value4: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &561599788 GameObject: m_ObjectHideFlags: 0 @@ -10878,6 +10918,53 @@ MonoBehaviour: m_EffectColor: {r: 0, g: 0, b: 0, a: 1} m_EffectDistance: {x: 1, y: -2} m_UseGraphicAlpha: 1 +--- !u!21 &597462146 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/Shiny_Reflect + m_Shader: {fileID: 4800000, guid: 6fc94ae14d17d3642b09718b5b932fd2, 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} + - _MainTex2: + m_Texture: {fileID: 2800000, guid: 6ed1aafd335608e48aa3198044a161df, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _Alpha: 0 + - _ColorMask: 15 + - _Distortion: -0.55011517 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _Value2: 0.5 + - _Value3: 1 + - _Value4: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &603237721 GameObject: m_ObjectHideFlags: 0 @@ -12771,7 +12858,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: $1.99 + m_text: $4.99 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: f9650ff3b67d45e42aa51501d10136f4, type: 2} m_sharedMaterial: {fileID: 2039440194532944411, guid: f9650ff3b67d45e42aa51501d10136f4, @@ -14019,6 +14106,46 @@ MonoBehaviour: m_EffectColor: {r: 0, g: 0, b: 0, a: 1} m_EffectDistance: {x: 2, y: 2} m_UseGraphicAlpha: 1 +--- !u!21 &799521080 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, 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: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &799731698 GameObject: m_ObjectHideFlags: 0 @@ -16798,46 +16925,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 918579380} m_CullTransparentMesh: 1 ---- !u!21 &920338696 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, 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: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1 &928408434 GameObject: m_ObjectHideFlags: 0 @@ -16919,46 +17006,6 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 415970651} m_PrefabAsset: {fileID: 0} ---- !u!21 &959220003 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, 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: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1 &964995013 GameObject: m_ObjectHideFlags: 0 @@ -21693,54 +21740,14 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1212653709 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1212653705} - m_CullTransparentMesh: 1 ---- !u!21 &1222344221 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, 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: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] +--- !u!222 &1212653709 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1212653705} + m_CullTransparentMesh: 1 --- !u!1 &1225131988 GameObject: m_ObjectHideFlags: 0 @@ -23601,7 +23608,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 498890822} + m_Material: {fileID: 597462146} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} @@ -28947,86 +28954,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1790415148045804941} m_CullTransparentMesh: 1 ---- !u!21 &1529401427 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, 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: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] ---- !u!21 &1531610694 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/GrayScale - m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, 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: - - _Alpha: 0 - - _ColorMask: 15 - - _EffectAmount: 1 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1 &1540880816 GameObject: m_ObjectHideFlags: 0 @@ -31198,10 +31125,6 @@ MonoBehaviour: Id: pipuzzle.pipes_4 desc: price: 4.99 - - Name: PiPuzzle pipe variation 5 - Id: pipuzzle.pipes_5 - desc: - price: 4.99 coinsRewards: 320000006400000096000000fa000000f4010000 inp: {fileID: 0} data: @@ -31256,11 +31179,6 @@ MonoBehaviour: PurchaseButton: {fileID: 838493655} EquipButton: {fileID: 1329581417} equipButtonText: {fileID: 1908925085} - - isPurchased: 0 - isEquipped: 0 - PurchaseButton: {fileID: 1887210683} - EquipButton: {fileID: 1398675766} - equipButtonText: {fileID: 737392329} currentPurchaseType: 0 coinTxt: {fileID: 1790415148045805690} AdsPurchasedWindow: {fileID: 0} @@ -31282,6 +31200,46 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!21 &1689060138 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, 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: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &1700333371 GameObject: m_ObjectHideFlags: 0 @@ -31691,6 +31649,46 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1709972827} m_CullTransparentMesh: 1 +--- !u!21 &1714798232 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, 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: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &1716425409 GameObject: m_ObjectHideFlags: 0 @@ -32001,7 +31999,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 1783571966} + m_Material: {fileID: 559606102} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} @@ -32719,6 +32717,46 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1752682036} m_CullTransparentMesh: 1 +--- !u!21 &1754841141 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 2DxFX/Standard/GrayScale + m_Shader: {fileID: 4800000, guid: 62ced1108742e2c4d99c2a6c0708300f, 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: + - _Alpha: 0 + - _ColorMask: 15 + - _EffectAmount: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] --- !u!1 &1757240999 GameObject: m_ObjectHideFlags: 0 @@ -33145,53 +33183,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1774503251} m_CullTransparentMesh: 1 ---- !u!21 &1783571966 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: 2DxFX/Standard/Shiny_Reflect - m_Shader: {fileID: 4800000, guid: 6fc94ae14d17d3642b09718b5b932fd2, 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} - - _MainTex2: - m_Texture: {fileID: 2800000, guid: 6ed1aafd335608e48aa3198044a161df, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _Alpha: 0 - - _ColorMask: 15 - - _Distortion: 1.1225998 - - _Stencil: 0 - - _StencilComp: 8 - - _StencilOp: 0 - - _StencilReadMask: 255 - - _StencilWriteMask: 255 - - _Value2: 0.261 - - _Value3: 0.53 - - _Value4: 0 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] --- !u!1 &1789723108 GameObject: m_ObjectHideFlags: 0 @@ -36720,7 +36711,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: $1.99 + m_text: $4.99 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: f9650ff3b67d45e42aa51501d10136f4, type: 2} m_sharedMaterial: {fileID: 2039440194532944411, guid: f9650ff3b67d45e42aa51501d10136f4, @@ -37549,7 +37540,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: $1.99 + m_text: $4.99 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: f9650ff3b67d45e42aa51501d10136f4, type: 2} m_sharedMaterial: {fileID: 2039440194532944411, guid: f9650ff3b67d45e42aa51501d10136f4, diff --git a/Assets/ShopManager.cs b/Assets/ShopManager.cs index 9386d1c2..5645babf 100644 --- a/Assets/ShopManager.cs +++ b/Assets/ShopManager.cs @@ -38,7 +38,7 @@ public class SubscriptionItem public class ShopManager : MonoBehaviour, IDetailedStoreListener { - IStoreController m_StoreContoller; + IStoreController m_StoreController; public List cItem; public List pItem; @@ -69,8 +69,52 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener int coins = PlayerPrefs.GetInt("Coin"); coinTxt.text = coins.ToString(); SetupBuilder(); + CheckIfProductPurchased(); PipePrefGetter(); } + + + public bool IsProductPurchased(string productId) + { + Product product = m_StoreController.products.WithID(productId); + bool itemBought = false; + if (product != null && product.hasReceipt) + { + // Owned Non Consumables and Subscriptions should always have receipts. + // So here the Non Consumable product has already been bought. + itemBought = true; + } + + //var product = m_StoreController?.catalog.allProducts.FirstOrDefault(p => p.definition.id == productId); + //if (product != null) + //{ + // return m_StoreController.playerReceipt.ContainsProduct(product); + //} + Debug.Log("IsProductPurchased Called for: " + productId); + return itemBought; + } + + + + // Call this function when you want to check if a product is purchased + + public void CheckIfProductPurchased() + { + for (int i = 1; i < pItem.Count; i++) + { + if (IsProductPurchased(pItem[i].Id)) + { + //PlayerPrefs.SetInt("PipeButtonIsEquipped" + 0, 1); + PlayerPrefs.SetInt("PipeButtonIsPurchased" + i, 1); + Debug.Log("Pipe " + i + " is purchased already!"); + // Product is purchased, grant access to features + } + //else + //{ + // // Product is not purchased, handle accordingly + //} + } + } void PipePrefGetter() { if (!PlayerPrefs.HasKey("PipeButtonIsEquipped" + 0)) @@ -126,7 +170,7 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener public void OnInitialized(IStoreController controller, IExtensionProvider extensions) { print("Success"); - m_StoreContoller = controller; + m_StoreController = controller; //CheckNonConsumable(ncItem.Id); //CheckSubscription(sItem.Id); } @@ -138,14 +182,14 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener { //AddCoins(50); currentPurchaseType = PurchaseType.Coins; - m_StoreContoller.InitiatePurchase(cItem[index].Id); + m_StoreController.InitiatePurchase(cItem[index].Id); } public void Consumable_Btn_Pressed_Pipes(int index) { //AddCoins(50); currentPurchaseType = PurchaseType.Pipes; Debug.Log("Purchasing pipes1... : " + pItem[index].Id); - m_StoreContoller.InitiatePurchase(pItem[index].Id); + m_StoreController.InitiatePurchase(pItem[index].Id); //Debug.Log("Purchasing pipes2... : "+ pItem[index].Id); } @@ -162,6 +206,7 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener // //ActivateElitePass(); // m_StoreContoller.InitiatePurchase(sItem.Id); //} + #endregion public PurchaseType currentPurchaseType; public enum PurchaseType @@ -238,9 +283,9 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener void CheckNonConsumable(string id) { - if (m_StoreContoller != null) + if (m_StoreController != null) { - var product = m_StoreContoller.products.WithID(id); + var product = m_StoreController.products.WithID(id); if (product != null) { if (product.hasReceipt)//purchased @@ -258,7 +303,7 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener void CheckSubscription(string id) { - var subProduct = m_StoreContoller.products.WithID(id); + var subProduct = m_StoreController.products.WithID(id); if (subProduct != null) { try