Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GalaxySmash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hà Trung (NEGAXY)
GalaxySmash
Commits
7d22f79d
Commit
7d22f79d
authored
Dec 15, 2021
by
Hà Trung (NEGAXY)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trung: them restore purchases
parent
e4551c32
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1105 additions
and
15 deletions
+1105
-15
button_galaxy.png
Assets/Game Resources/Sprites/Setting/button_galaxy.png
+0
-0
button_galaxy.png.meta
Assets/Game Resources/Sprites/Setting/button_galaxy.png.meta
+132
-0
IAPManager.cs
Assets/Negaxy Ads/Scripts/IAPManager.cs
+25
-0
home.unity
Assets/OSG Infinity Square Space/Scenes/home.unity
+914
-15
GuiManager.cs
Assets/Scripts/UI/GuiManager.cs
+1
-0
RestorePurchasePopup.cs
Assets/Scripts/UI/RestorePurchasePopup.cs
+7
-0
RestorePurchasePopup.cs.meta
Assets/Scripts/UI/RestorePurchasePopup.cs.meta
+11
-0
SettingPopup.cs
Assets/Scripts/UI/SettingPopup.cs
+15
-0
No files found.
Assets/Game Resources/Sprites/Setting/button_galaxy.png
0 → 100644
View file @
7d22f79d
3.26 KB
Assets/Game Resources/Sprites/Setting/button_galaxy.png.meta
0 → 100644
View file @
7d22f79d
fileFormatVersion: 2
guid: 116bedafecff33d458bb423d6ac7cf28
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Negaxy Ads/Scripts/IAPManager.cs
View file @
7d22f79d
...
...
@@ -133,4 +133,29 @@ public class IAPManager : Singleton<IAPManager>, IStoreListener
{
return
m_StoreController
.
products
.
WithID
(
GetPackageID
(
id
));
}
public
void
OnRestorePurchase
(
Action
<
bool
>
m_callback
)
{
if
(!
IsInitialized
())
{
Debug
.
Log
(
"RestorePurchases FAIL. Not initialized."
);
return
;
}
if
(
Application
.
platform
==
RuntimePlatform
.
IPhonePlayer
||
Application
.
platform
==
RuntimePlatform
.
OSXPlayer
)
{
Debug
.
Log
(
"RestorePurchases started ..."
);
var
apple
=
m_StoreExtensionProvider
.
GetExtension
<
IAppleExtensions
>();
apple
.
RestoreTransactions
((
result
)
=>
{
Debug
.
Log
(
"RestorePurchases continuing: "
+
result
+
". If no further messages, no purchases available to restore."
);
m_callback
?.
Invoke
(
result
);
});
}
else
{
Debug
.
Log
(
"RestorePurchases FAIL. Not supported on this platform. Current = "
+
Application
.
platform
);
}
}
}
\ No newline at end of file
Assets/OSG Infinity Square Space/Scenes/home.unity
View file @
7d22f79d
This diff is collapsed.
Click to expand it.
Assets/Scripts/UI/GuiManager.cs
View file @
7d22f79d
...
...
@@ -29,6 +29,7 @@ public class GuiManager : MonoBehaviour
public
MergePopup
mergePopup
;
public
NotifyMultiRewardPopup
notifyMultiRewardPopup
;
public
BuyCallbackPopup
buyCallbackPopup
;
public
RestorePurchasePopup
restorePurchasePopup
;
[
Header
(
"Audios"
)]
public
AudioSource
source
;
...
...
Assets/Scripts/UI/RestorePurchasePopup.cs
0 → 100644
View file @
7d22f79d
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
RestorePurchasePopup
:
BasePopup
{
}
Assets/Scripts/UI/RestorePurchasePopup.cs.meta
0 → 100644
View file @
7d22f79d
fileFormatVersion: 2
guid: b78c2163d7038cd42aea76ec40c1bc1a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/UI/SettingPopup.cs
View file @
7d22f79d
...
...
@@ -34,6 +34,21 @@ public class SettingPopup : BasePopup
CheckSound
();
GuiManager
.
Instance
.
CheckSound
();
}
public
void
OnClick_RestorePurchase
()
{
IAPManager
.
Instance
.
OnRestorePurchase
((
result
)
=>
{
if
(
result
)
{
GuiManager
.
Instance
.
restorePurchasePopup
.
gameObject
.
SetActive
(
true
);
DataManager
.
Instance
.
userData
.
adRemoved
=
true
;
DataManager
.
Instance
.
SaveUserData
();
AdsController
.
instance
.
HideBanner
();
GuiManager
.
Instance
.
homeScreen
.
CheckRemoveAds
();
}
});
}
private
void
CheckSound
()
{
bool
soundOn
=
DataManager
.
Instance
.
IsSoundOn
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment