修改WebGL工程

This commit is contained in:
yangjing 2022-07-27 10:30:05 +08:00
parent be27e4c35a
commit d60c23ed42
660 changed files with 71 additions and 211356 deletions

View File

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

View File

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

View File

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

View File

@ -1,28 +0,0 @@
fileFormatVersion: 2
guid: eca69e0c5e72e436cb319d67d66e889e
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b9d295f1d6b40474b832740c53dc0162
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b1e0c8870faab4b1e81eb56a2625ca49
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 5da1691e284094478a2e118f3b0a75f3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: cf3e87ee224034a7ca32d0029936d6c9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: ad451212a49674981ba4f6b25add243e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Info.plist</key>
<data>
T4RB0EWDHyhQoZy/X2RHolrBuJs=
</data>
</dict>
<key>files2</key>
<dict/>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: aa1bc22b5c00243859a237218c12aca1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 666f447dd2b6443b39554966728d7c78
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,28 +0,0 @@
fileFormatVersion: 2
guid: 936e305fe37c541929e42bb5327a2b21
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -1,115 +0,0 @@
//
// UMRemoteConfig.h
// myFireBase
//
// Created by 张军华 on 2019/12/30.
// Copyright © 2019年 张军华. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "UMRemoteConfigEnum.h"
NS_ASSUME_NONNULL_BEGIN
typedef void (^UMRemoteConfigFetchCompletion)(UMRemoteConfigFetchStatus status,
NSError *_Nullable error);
typedef void (^UMRemoteConfigActivateCompletion)(NSError *_Nullable error);
@protocol UMRemoteConfigDelegate<NSObject>
@optional
/**
* @brief
* @param status see UMRemoteConfigFetchStatus
* @param error
* @param userInfo
* @note
* fetchWithCompletionHandler
* fetchAndActivateWithCompletionHandler
*/
-(void)remoteConfigFetched:(UMRemoteConfigFetchStatus)status
error:(nullable NSError*)error
userInfo:(nullable id)userInfo;
/**
* @brief
* @param status see UMRemoteConfigActiveStatus
* @param error
* @param userInfo
* @note
* fetchAndActivateWithCompletionHandler
* activateWithCompletionHandler
*/
-(void)remoteConfigActivated:(UMRemoteConfigActiveStatus)status
error:(nullable NSError*)error
userInfo:(nullable id)userInfo;
/**
* @brief
* @param status see UMRemoteConfigActiveStatus
* @param error
* @param userInfo
* @note
* fetchWithCompletionHandler
*/
-(void)remoteConfigReady:(UMRemoteConfigActiveStatus)status
error:(nullable NSError*)error
userInfo:(nullable id)userInfo;
@end
@class UMRemoteConfigSettings;
@interface UMRemoteConfig : NSObject
@property(nonatomic,weak)id<UMRemoteConfigDelegate> remoteConfigDelegate;
@property(nonatomic, readwrite, strong) UMRemoteConfigSettings *configSettings;
#pragma mark - init
/**
* @brief
* @param delegate see UMRemoteConfigDelegate
* @note
remoteConfigWithDelegate:(id<UMRemoteConfigDelegate>)delegateready的数据可以回调给用户
*/
+ (UMRemoteConfig *)remoteConfigWithDelegate:(nullable id<UMRemoteConfigDelegate>)delegate
withConfigSettings:(nullable UMRemoteConfigSettings*)configSettings;
+ (UMRemoteConfig *)remoteConfig;
#pragma mark - activate
/**
* @brief
* @param completionHandler
*/
+ (void)activateWithCompletionHandler:(nullable UMRemoteConfigActivateCompletion)completionHandler;
#pragma mark - Get Config
/**
* @brief
* @param key key
* @note ->Defaults
*/
+ (nullable id)configValueForKey:(nullable NSString *)key;
#pragma mark - Defaults
/**
* @brief
* @param defaults
*/
+ (void)setDefaults:(nullable NSDictionary<NSString *, NSObject *> *)defaults;
/**
* @brief
* @param fileName plist文件
*/
+ (void)setDefaultsFromPlistFileName:(nullable NSString *)fileName;
+(NSString*)sdkVersion;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 9840d4c4318154ad0aedd3db85a160c5
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,54 +0,0 @@
//
// UMRemoteConfigEnum.h
// myFireBase
//
// Created by 张军华 on 2019/12/30.
// Copyright © 2019年 张军华. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// Indicates whether updated data was successfully fetched.
typedef NS_ENUM(NSInteger, UMRemoteConfigFetchStatus) {
/// Config has never been fetched.
UMRemoteConfigFetchStatusNoFetchYet,
/// Config fetch succeeded.
UMRemoteConfigFetchStatusSuccess,
/// Config fetch failed.
UMRemoteConfigFetchStatusFailure,
/// Config fetch was throttled.
UMRemoteConfigFetchStatusThrottled,
};
/// Indicates whether ActiveStatus in the local data .
typedef NS_ENUM(NSInteger, UMRemoteConfigActiveStatus) {
UMRemoteConfigActiveStatus_None,
UMRemoteConfigActiveStatus_Ready,
UMRemoteConfigActiveStatus_Active,
UMRemoteConfigActiveStatus_Expiration
};
///// Indicates whether updated data was successfully fetched and activated.
//typedef NS_ENUM(NSInteger, UMRemoteConfigFetchAndActivateStatus) {
// // The remote fetch succeeded and fetched data was activated.
// UMRemoteConfigFetchAndActivateStatusSuccessFetchedFromRemote,
// // The fetch and activate succeeded from already fetched but yet unexpired config data. You can
// // control this using minimumFetchInterval property in FIRRemoteConfigSettings.
// UMRemoteConfigFetchAndActivateStatusSuccessUsingPreFetchedData,
// // The fetch and activate failed.
// UMRemoteConfigFetchAndActivateStatusError
//};
//typedef NS_ENUM(NSInteger, UMRemoteConfigSource) {
// UMRemoteConfigSourceRemote, ///< The data source is the Remote Config service.
// UMRemoteConfigSourceDefault, ///< The data source is the DefaultConfig defined for this app.
// UMRemoteConfigSourceStatic, ///< The data doesn't exist, return a static initialized value.
//};
NS_ASSUME_NONNULL_END

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 782c7de76a22d40dfb37a8437a2ea3a3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,31 +0,0 @@
//
// UMRemoteConfigSettings.h
// myFireBase
//
// Created by 张军华 on 2019/12/30.
// Copyright © 2019年 张军华. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface UMRemoteConfigSettings : NSObject
/// Indicates the default value in seconds to set for the minimum interval that needs to elapse
/// before a fetch request can again be made to the Remote Config backend. After a fetch request to
/// the backend has succeeded, no additional fetch requests to the backend will be allowed until the
/// minimum fetch interval expires.
/// @note 目前没用,保留字段
@property(atomic, assign) NSTimeInterval minimumFetchInterval;
/// Indicates the default value in seconds to abandon a pending fetch request made to the backend.
/// This value is set for outgoing requests as the timeoutIntervalForRequest as well as the
/// timeoutIntervalForResource on the NSURLSession's configuration.
/// @note 目前没用,保留字段
@property(atomic, assign) NSTimeInterval fetchTimeout;
///active after fetch config
///获取远程配置后,是否激活
@property(atomic, assign) BOOL activateAfterFetch;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 1294a7658c772475faf0ec2c9f3e0c75
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: a61e112658de04b20b31be593643b5c9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -1,6 +0,0 @@
framework module UMRemoteConfig {
umbrella header "UMRemoteConfig.h"
export *
module * { export * }
}

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 029e23b4cda80416d9ed94ad22322a25
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 028f9d614ff9645049c5442f49e415a0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: f331eb275e4a044118d322d3a084c5dc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: dcad451e8aec74340b22c7a5ad1ccbd1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 9029b80a1d92f4b059f54c3a82301106
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,162 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/UMRemoteConfig.h</key>
<data>
2zOYD1TMew+VwIEBQFig4siBzYs=
</data>
<key>Headers/UMRemoteConfigEnum.h</key>
<data>
jIv4/Fu+lm5zYcJJbi3g8+9aZJ8=
</data>
<key>Headers/UMRemoteConfigSettings.h</key>
<data>
M0B9HHiPhuklGl2IFXOyP4SALJo=
</data>
<key>Info.plist</key>
<data>
qHjDD9JDk8koBxQ50RQa/BtOAU0=
</data>
<key>Modules/module.modulemap</key>
<data>
WzIWBeQkQ46cuqzMPGhKDhFgjJ4=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/UMRemoteConfig.h</key>
<dict>
<key>hash</key>
<data>
2zOYD1TMew+VwIEBQFig4siBzYs=
</data>
<key>hash2</key>
<data>
SXe+4paEy/wA38Wdk8dek0mmHwZNJrZNzcdYstVH2Ho=
</data>
</dict>
<key>Headers/UMRemoteConfigEnum.h</key>
<dict>
<key>hash</key>
<data>
jIv4/Fu+lm5zYcJJbi3g8+9aZJ8=
</data>
<key>hash2</key>
<data>
CqjuRf2c5jVNo7Rh6RdTjgDMaCmvmY5WkNvagHLeM90=
</data>
</dict>
<key>Headers/UMRemoteConfigSettings.h</key>
<dict>
<key>hash</key>
<data>
M0B9HHiPhuklGl2IFXOyP4SALJo=
</data>
<key>hash2</key>
<data>
5D5D58088udYAz193uJHLPnoEHXxTrA4xmo3l1qveKI=
</data>
</dict>
<key>Modules/module.modulemap</key>
<dict>
<key>hash</key>
<data>
WzIWBeQkQ46cuqzMPGhKDhFgjJ4=
</data>
<key>hash2</key>
<data>
MIYmrVaLytPwMR98BGJC/n+LLv141Li65jW0RdfTpSc=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b29d5e4271ebd461ebf3bca61b62460a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 2284204ea11fb4b92bce0a0b687322c5
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4c40cb7a87dae4af190f05c10cd269e0 guid: 5a142360dcbc341608e7f04d1b42c02e
TrueTypeFontImporter: TrueTypeFontImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 4 serializedVersion: 4
@ -8,9 +8,9 @@ TrueTypeFontImporter:
characterSpacing: 0 characterSpacing: 0
characterPadding: 1 characterPadding: 1
includeFontData: 1 includeFontData: 1
fontName: Resource Han Rounded CN fontName: Kingnam Bobo
fontNames: fontNames:
- Resource Han Rounded CN - Kingnam Bobo
fallbackFontReferences: [] fallbackFontReferences: []
customCharacters: customCharacters:
fontRenderingMode: 0 fontRenderingMode: 0

View File

@ -1146,7 +1146,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4c40cb7a87dae4af190f05c10cd269e0, type: 3} m_Font: {fileID: 12800000, guid: 5a142360dcbc341608e7f04d1b42c02e, type: 3}
m_FontSize: 25 m_FontSize: 25
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0

View File

@ -2174,7 +2174,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4c40cb7a87dae4af190f05c10cd269e0, type: 3} m_Font: {fileID: 12800000, guid: 5a142360dcbc341608e7f04d1b42c02e, type: 3}
m_FontSize: 40 m_FontSize: 40
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
@ -3178,7 +3178,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4c40cb7a87dae4af190f05c10cd269e0, type: 3} m_Font: {fileID: 12800000, guid: 5a142360dcbc341608e7f04d1b42c02e, type: 3}
m_FontSize: 25 m_FontSize: 25
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 1 m_BestFit: 1
@ -3991,7 +3991,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4c40cb7a87dae4af190f05c10cd269e0, type: 3} m_Font: {fileID: 12800000, guid: 5a142360dcbc341608e7f04d1b42c02e, type: 3}
m_FontSize: 40 m_FontSize: 40
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 1 m_BestFit: 1
@ -4278,7 +4278,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4c40cb7a87dae4af190f05c10cd269e0, type: 3} m_Font: {fileID: 12800000, guid: 5a142360dcbc341608e7f04d1b42c02e, type: 3}
m_FontSize: 25 m_FontSize: 25
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 1 m_BestFit: 1

View File

@ -140,7 +140,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4c40cb7a87dae4af190f05c10cd269e0, type: 3} m_Font: {fileID: 12800000, guid: 5a142360dcbc341608e7f04d1b42c02e, type: 3}
m_FontSize: 35 m_FontSize: 35
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0

View File

@ -1848,7 +1848,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4c40cb7a87dae4af190f05c10cd269e0, type: 3} m_Font: {fileID: 12800000, guid: 5a142360dcbc341608e7f04d1b42c02e, type: 3}
m_FontSize: 40 m_FontSize: 40
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
@ -1926,7 +1926,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4c40cb7a87dae4af190f05c10cd269e0, type: 3} m_Font: {fileID: 12800000, guid: 5a142360dcbc341608e7f04d1b42c02e, type: 3}
m_FontSize: 25 m_FontSize: 25
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 1 m_BestFit: 1
@ -2181,7 +2181,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4c40cb7a87dae4af190f05c10cd269e0, type: 3} m_Font: {fileID: 12800000, guid: 5a142360dcbc341608e7f04d1b42c02e, type: 3}
m_FontSize: 25 m_FontSize: 25
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 1 m_BestFit: 1
@ -2261,6 +2261,7 @@ MonoBehaviour:
mBtnTip: {fileID: 888830189749965682} mBtnTip: {fileID: 888830189749965682}
mBtnSkip: {fileID: 3999716281573587820} mBtnSkip: {fileID: 3999716281573587820}
mBtnEndings: {fileID: 3844714966269200113} mBtnEndings: {fileID: 3844714966269200113}
ReviewShowed: 0
--- !u!114 &606610774082834523 --- !u!114 &606610774082834523
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -44,7 +44,7 @@ public class VibrateManager
if (mIsVibrateOn) if (mIsVibrateOn)
{ {
//Debug.Log("Shake!!!"); //Debug.Log("Shake!!!");
Handheld.Vibrate(); //Handheld.Vibrate();
} }
} }
} }

View File

@ -25,8 +25,8 @@ public class GameLogic : MonoBehaviour
mUIGame.DelPlay = PlayFilm; mUIGame.DelPlay = PlayFilm;
TKGSDKManager.Instance.NotifyGameStart(PlayerData.Instance.CurrentLevel); //TKGSDKManager.Instance.NotifyGameStart(PlayerData.Instance.CurrentLevel);
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.StartGame, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.StartGame, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
} }
private void PlayFilm(int[] pSoundOrder) private void PlayFilm(int[] pSoundOrder)
@ -69,7 +69,7 @@ public class GameLogic : MonoBehaviour
bool tIsWin = true; bool tIsWin = true;
PanelResult tUIResult = UIManager.Instance.OpenUI<PanelResult>(); PanelResult tUIResult = UIManager.Instance.OpenUI<PanelResult>();
tUIResult.ReviewShowed = !TKGSDKManager.Instance.NotifyGameEnd(PlayerData.Instance.CurrentLevel, tIsWin); tUIResult.ReviewShowed = false;// !TKGSDKManager.Instance.NotifyGameEnd(PlayerData.Instance.CurrentLevel, tIsWin);
bool tHasComplete = PlayerData.Instance.EndingCountOfLevel(PlayerData.Instance.CurrentLevelID) == tLvData.Endings.Count; bool tHasComplete = PlayerData.Instance.EndingCountOfLevel(PlayerData.Instance.CurrentLevelID) == tLvData.Endings.Count;
if (tEndingID >= 0) if (tEndingID >= 0)
{ {
@ -100,8 +100,8 @@ public class GameLogic : MonoBehaviour
tIsWin = false; tIsWin = false;
} }
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.FinishGame, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.FinishGame, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
TKGSDKManager.Instance.LogEvent(tIsWin ? Const.AdsEvent.GameWin : Const.AdsEvent.GameLose, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(tIsWin ? Const.AdsEvent.GameWin : Const.AdsEvent.GameLose, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
tUIResult.DelAgain = PlayAgain; tUIResult.DelAgain = PlayAgain;
} }

View File

@ -9,7 +9,8 @@ public class InitLogic : MonoBehaviour
{ {
Application.targetFrameRate = 60; Application.targetFrameRate = 60;
TKGSDKManager.Instance.InitSDK(EnterGame); //TKGSDKManager.Instance.InitSDK(EnterGame);
EnterGame();
} }
private void EnterGame() private void EnterGame()

View File

@ -89,7 +89,7 @@ public class ButtonEndings : MonoBehaviour
private void OnClick() private void OnClick()
{ {
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.ClickTip, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.ClickTip, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
ShowTip(false); ShowTip(false);
DelClick?.Invoke(); DelClick?.Invoke();

View File

@ -93,10 +93,11 @@ public class EndingCell : MonoBehaviour
private void OnClickAdTip() private void OnClickAdTip()
{ {
TKGSDKManager.Instance.PlayRewardAd(Const.AdsEvtValue.UnlockSound, WatchAdSucceed, () => //TKGSDKManager.Instance.PlayRewardAd(Const.AdsEvtValue.UnlockSound, WatchAdSucceed, () =>
{ //{
UIManager.Instance.OpenUI<PanelNoAdsTip>(); // UIManager.Instance.OpenUI<PanelNoAdsTip>();
}); //});
WatchAdSucceed(true);
} }
private void WatchAdSucceed(bool pResult) private void WatchAdSucceed(bool pResult)
@ -109,6 +110,6 @@ public class EndingCell : MonoBehaviour
mBtnAdTip.gameObject.SetActive(false); mBtnAdTip.gameObject.SetActive(false);
OnClickTip(); OnClickTip();
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.UnlockTip, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.UnlockTip, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
} }
} }

View File

@ -61,7 +61,7 @@ public class LevelPage : PageView
tCell.SetUnlock(); tCell.SetUnlock();
tCell.DelClick = OnClickUnlockLevel; tCell.DelClick = OnClickUnlockLevel;
TKGSDKManager.Instance.LogRewardAdBtnShow(Const.AdsEvtValue.UnlockLevel); //TKGSDKManager.Instance.LogRewardAdBtnShow(Const.AdsEvtValue.UnlockLevel);
} }
else else
{ {
@ -90,14 +90,17 @@ public class LevelPage : PageView
private void OnClickUnlockLevel(int pLevelIndex) private void OnClickUnlockLevel(int pLevelIndex)
{ {
TKGSDKManager.Instance.PlayRewardAd(Const.AdsEvtValue.UnlockLevel, (pResult) => //TKGSDKManager.Instance.PlayRewardAd(Const.AdsEvtValue.UnlockLevel, (pResult) =>
{ //{
if (pResult) // if (pResult)
{ // {
PlayerData.Instance.UnlockNewLevel(false); // PlayerData.Instance.UnlockNewLevel(false);
LoadData(true); // LoadData(true);
} // }
}); //});
PlayerData.Instance.UnlockNewLevel(false);
LoadData(true);
} }
private void PageChanged(int pPageIndex) private void PageChanged(int pPageIndex)

View File

@ -50,7 +50,7 @@ public class PanelEndings : BasePanel
if (PlayerData.Instance.EndingAdTipCountOfLevel(mLevelID) < mLvData.Endings.Count) if (PlayerData.Instance.EndingAdTipCountOfLevel(mLevelID) < mLvData.Endings.Count)
{ {
TKGSDKManager.Instance.LogRewardAdBtnShow(Const.AdsEvtValue.UnlockSound); //TKGSDKManager.Instance.LogRewardAdBtnShow(Const.AdsEvtValue.UnlockSound);
} }
} }

View File

@ -144,19 +144,19 @@ public class PanelGame : BasePanel
private void OnClickMoreGame() private void OnClickMoreGame()
{ {
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.ClickMoreGame, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.ClickMoreGame, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
TKGSDKManager.Instance.OpenMoreGame(); //TKGSDKManager.Instance.OpenMoreGame();
} }
private void OnClickLevel() private void OnClickLevel()
{ {
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.ClickLevel, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.ClickLevel, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
PanelLevel tUILevel = UIManager.Instance.OpenUI<PanelLevel>(); PanelLevel tUILevel = UIManager.Instance.OpenUI<PanelLevel>();
tUILevel.Init(true); tUILevel.Init(true);
TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.GamingSelect); //TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.GamingSelect);
} }
private void OnClickMenu() private void OnClickMenu()

View File

@ -37,7 +37,7 @@ public class PanelLevel : BasePanel
mRctScream.gameObject.SetActive(false); mRctScream.gameObject.SetActive(false);
mGobOpMask.SetActive(false); mGobOpMask.SetActive(false);
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.PanelLevelShowed); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.PanelLevelShowed);
} }
public override void OnClose() public override void OnClose()
@ -45,7 +45,7 @@ public class PanelLevel : BasePanel
base.OnClose(); base.OnClose();
AudioManager.Instance.PlaySound(AudioClipType.UIClose); AudioManager.Instance.PlaySound(AudioClipType.UIClose);
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.PanelLevelBack); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.PanelLevelBack);
} }
public void Init(bool pOpenInLevel) public void Init(bool pOpenInLevel)
@ -80,7 +80,7 @@ public class PanelLevel : BasePanel
private void OnClickBackToMain() private void OnClickBackToMain()
{ {
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.PanelLevelHome); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.PanelLevelHome);
GameManager.Instance.LoadMain(); GameManager.Instance.LoadMain();
} }

View File

@ -96,7 +96,7 @@ public class PanelMain : BasePanel
ShowMainPart(); ShowMainPart();
} }
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.PanelMainShowed); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.PanelMainShowed);
} }
public override void OnClose() public override void OnClose()
@ -434,11 +434,11 @@ public class PanelMain : BasePanel
private void OnClickPrivacy() private void OnClickPrivacy()
{ {
TKGSDKManager.Instance.OpenPrivacyURL(); //TKGSDKManager.Instance.OpenPrivacyURL();
} }
private void OnClickUserPolicy() private void OnClickUserPolicy()
{ {
TKGSDKManager.Instance.OpenUserTermURL(); //TKGSDKManager.Instance.OpenUserTermURL();
} }
} }

View File

@ -76,7 +76,7 @@ public class PanelResult : BasePanel
mBtnSkip.gameObject.SetActive(PlayerData.Instance.CurrentLevel >= PlayerData.Instance.UnlockedLevel); mBtnSkip.gameObject.SetActive(PlayerData.Instance.CurrentLevel >= PlayerData.Instance.UnlockedLevel);
if (mBtnSkip.gameObject.activeSelf) if (mBtnSkip.gameObject.activeSelf)
{ {
TKGSDKManager.Instance.LogRewardAdBtnShow(Const.AdsEvtValue.EndSkip); //TKGSDKManager.Instance.LogRewardAdBtnShow(Const.AdsEvtValue.EndSkip);
} }
LevelData tLvData = GameConfig.Instance.GetLevelData(pLevelID); LevelData tLvData = GameConfig.Instance.GetLevelData(pLevelID);
@ -101,38 +101,38 @@ public class PanelResult : BasePanel
private void OnClickAgain() private void OnClickAgain()
{ {
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.EndRetry, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.EndRetry, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
DelAgain?.Invoke(); DelAgain?.Invoke();
if (!ReviewShowed) if (!ReviewShowed)
{ {
TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.EndRetry); //TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.EndRetry);
} }
} }
private void OnClickNext() private void OnClickNext()
{ {
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.EndNext, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.EndNext, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
GameManager.Instance.NextLevel(); GameManager.Instance.NextLevel();
if (!ReviewShowed) if (!ReviewShowed)
{ {
TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.EndNext); //TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.EndNext);
} }
} }
private void OnClickChoose() private void OnClickChoose()
{ {
TKGSDKManager.Instance.LogEvent(Const.AdsEvent.EndSelect, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString()); //TKGSDKManager.Instance.LogEvent(Const.AdsEvent.EndSelect, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
PanelLevel tUILevel = UIManager.Instance.OpenUI<PanelLevel>(); PanelLevel tUILevel = UIManager.Instance.OpenUI<PanelLevel>();
tUILevel.Init(true); tUILevel.Init(true);
if (!ReviewShowed) if (!ReviewShowed)
{ {
TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.EndSelect); //TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.EndSelect);
} }
} }
@ -144,13 +144,16 @@ public class PanelResult : BasePanel
private void OnClickSkip() private void OnClickSkip()
{ {
TKGSDKManager.Instance.PlayRewardAd(Const.AdsEvtValue.EndSkip, (pResult) => //TKGSDKManager.Instance.PlayRewardAd(Const.AdsEvtValue.EndSkip, (pResult) =>
{ //{
if (pResult) // if (pResult)
{ // {
PlayerData.Instance.UnlockNewLevel(); // PlayerData.Instance.UnlockNewLevel();
GameManager.Instance.NextLevel(); // GameManager.Instance.NextLevel();
} // }
}); //});
PlayerData.Instance.UnlockNewLevel();
GameManager.Instance.NextLevel();
} }
} }

View File

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

View File

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

View File

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

View File

@ -1,423 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Touka;
public class TKGSDKManager : TKGSingleton<TKGSDKManager>, ITKGSDK
{
public bool IsNoAllAD = false;
public bool IsNoInterstitialAD = false;
private ITKGSDK m_sdkInterface;
protected override void OnInstanceCreate()
{
base.OnInstanceCreate();
#if UNITY_EDITOR
m_sdkInterface = new TKGSDKUnity();
#elif UNITY_IOS
m_sdkInterface = new TKGSDKUnity();
#elif UNITY_ANDROID
m_sdkInterface = new TKGSDKNative();
#else
m_sdkInterface = new TKGSDKUnity();
#endif
}
/// <summary>
/// init sdk
/// </summary>
/// <param name="_initCallback"></param>
public void InitSDK(Action _initCallback = null)
{
m_sdkInterface.InitSDK(_initCallback);
#if USE_IAP
IAPTool.Instance.Initialize();
#endif
#if USE_FIREBASE
FirebaseTool.Instance.Initialize();
#endif
}
/// <summary>
/// Set game focus
/// </summary>
/// <param name="_gameFocusAction"></param>
public void SetGameFocusListener(Action<bool> _gameFocusAction)
{
m_sdkInterface.SetGameFocusListener(_gameFocusAction);
}
/// <summary>
/// Get channel
/// </summary>
/// <returns></returns>
public AppChannel GetChannel()
{
return m_sdkInterface.GetChannel();
}
#region Ads
/// <summary>
/// Show banner
/// </summary>
/// <param name="_pos">1:top,2:bottom</param>
public void ShowBanner(int _pos)
{
m_sdkInterface.ShowBanner(_pos);
}
/// <summary>
/// Hide banner
/// </summary>
public void HideBanner()
{
m_sdkInterface.HideBanner();
}
/// <summary>
/// ShowNative
/// </summary>
/// <param name="pRect"></param>
/// <param name="pAdPos"></param>
/// <param name="pCam"></param>
public void ShowNative(RectTransform pRect, string pAdPos, Camera pCam = null)
{
Vector3[] tWorldCorners = new Vector3[4];
pRect.GetWorldCorners(tWorldCorners);
Vector2 tTopLeft = RectTransformUtility.WorldToScreenPoint(pCam, tWorldCorners[1]);
Vector2 tBottomRight = RectTransformUtility.WorldToScreenPoint(pCam, tWorldCorners[3]);
float tWidth = Mathf.Abs(tBottomRight.x - tTopLeft.x);
float tHeight = Mathf.Abs(tBottomRight.y - tTopLeft.y);
if (IsNativeReady())
{
ShowNative(pAdPos, tTopLeft.x, Screen.height - tTopLeft.y, tWidth, tHeight);
}
}
/// <summary>
/// ShowNative
/// </summary>
/// <param name="nativePos"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="width"></param>
/// <param name="height"></param>
public void ShowNative(string nativePos, float x, float y, float width, float height)
{
m_sdkInterface.ShowNative(nativePos, x, y, width, height);
}
/// <summary>
/// HideNative
/// </summary>
public void HideNative()
{
m_sdkInterface.HideNative();
}
/// <summary>
/// Is Ready Native
/// </summary>
/// <returns></returns>
public bool IsNativeReady()
{
return m_sdkInterface.IsNativeReady();
}
/// <summary>
/// Play Interstitial Ad
/// </summary>
/// <param name="_adPos"></param>
/// <param name="_callback"></param>
/// <param name="_IvType"></param>
public void PlayInterstitialAd(string _adPos, Action _callback = null, IVADType _IvType = IVADType.IV1)
{
#if UNITY_EDITOR
if (null != _callback)
{
_callback.Invoke();
}
#endif
if (IsNoAllAD || IsNoInterstitialAD)
{
_callback?.Invoke();
}
else
{
m_sdkInterface.PlayInterstitialAd(_adPos, _callback, _IvType);
}
}
/// <summary>
/// Play Reward Ad
/// </summary>
/// <param name="_adPos"></param>
/// <param name="_rewardCallback"></param>
/// <param name="_playFailedCallback"></param>
public void PlayRewardAd(string _adPos, Action<bool> _rewardCallback = null, Action _playFailedCallback = null)
{
#if UNITY_EDITOR
if(null != _rewardCallback)
{
_rewardCallback.Invoke(true);
}
return;
#endif
if (IsNoAllAD)
{
_rewardCallback?.Invoke(true);
}
else
{
m_sdkInterface.PlayRewardAd(_adPos, _rewardCallback, _playFailedCallback);
}
}
/// <summary>
/// Is Ready Interstitial
/// </summary>
/// <returns></returns>
public bool IsReadyInterstitialAd()
{
return m_sdkInterface.IsReadyInterstitialAd();
}
/// <summary>
/// Is Ready Reward
/// </summary>
/// <returns></returns>
public bool IsReadyRewardAd()
{
return m_sdkInterface.IsReadyRewardAd();
}
#endregion
#region Log Event
#region Normal
/// <summary>
/// Log Event
/// </summary>
/// <param name="_eventSort"></param>
public void LogEvent(string _eventSort)
{
m_sdkInterface.LogEvent(_eventSort);
}
/// <summary>
/// Log Event
/// </summary>
/// <param name="_eventSort"></param>
/// <param name="_key"></param>
/// <param name="_value"></param>
public void LogEvent(string _eventSort, string _key, string _value)
{
m_sdkInterface.LogEvent(_eventSort, _key, _value);
}
/// <summary>
/// Log Event
/// </summary>
/// <param name="_eventSort"></param>
/// <param name="_key01"></param>
/// <param name="_value01"></param>
/// <param name="_key02"></param>
/// <param name="_value02"></param>
public void LogEvent(string _eventSort, string _key01, string _value01, string _key02, string _value02)
{
m_sdkInterface.LogEvent(_eventSort, _key01, _value01, _key02, _value02);
}
/// <summary>
/// Log Event
/// </summary>
/// <param name="_eventSort"></param>
/// <param name="_eventDic"></param>
public void LogEvent(string _eventSort, Dictionary<string, string> _eventDic = null)
{
m_sdkInterface.LogEvent(_eventSort, _eventDic);
}
#endregion
#region Level Event
/// <summary>
/// Notify game start
/// </summary>
/// <param name="_level"></param>
public void NotifyGameStart(int _level)
{
m_sdkInterface.NotifyGameStart(_level);
}
/// <summary>
/// Notify game start
/// </summary>
/// <param name="_level"></param>
public void NotifyGameStart(string _level)
{
m_sdkInterface.NotifyGameStart(_level);
}
/// <summary>
/// Notify game end
/// </summary>
/// <param name="_level"></param>
/// <param name="_win"></param>
public bool NotifyGameEnd(int _level, bool _win)
{
return m_sdkInterface.NotifyGameEnd(_level, _win);
}
/// <summary>
/// Notify game end
/// </summary>
/// <param name="_level"></param>
/// <param name="_win"></param>
public bool NotifyGameEnd(string _level, bool _win)
{
return m_sdkInterface.NotifyGameEnd(_level, _win);
}
#endregion
#region Reward Ad Button Show
/// <summary>
/// Log Reward ad button show
/// </summary>
/// <param name="_pos"></param>
public void LogRewardAdBtnShow(string _pos)
{
m_sdkInterface.LogRewardAdBtnShow(_pos);
}
#endregion
#region Tracking Event
/// <summary>
/// Log Tracking Event
/// </summary>
/// <param name="_eventType"></param>
public void LogTrackingEvent(TrackingEventType _eventType)
{
m_sdkInterface.LogTrackingEvent(_eventType);
}
#endregion
#endregion
#region Online Config
/// <summary>
/// get config - string
/// </summary>
/// <param name="_key"></param>
/// <param name="_default"></param>
/// <returns></returns>
public string GetConfigStr(string _key, string _default = "")
{
#if USE_FIREBASE
return FirebaseTool.Instance.GetString(_key, _default);
#endif
return m_sdkInterface.GetConfigStr(_key, _default);
}
/// <summary>
/// get config - int
/// </summary>
/// <param name="_key"></param>
/// <param name="_default"></param>
/// <returns></returns>
public int GetConfigInt(string _key, int _default = 0)
{
#if USE_FIREBASE
return FirebaseTool.Instance.GetInt(_key, _default);
#endif
return m_sdkInterface.GetConfigInt(_key, _default);
}
/// <summary>
/// get config - bool
/// </summary>
/// <param name="_key"></param>
/// <param name="_default"></param>
/// <returns></returns>
public bool GetConfigBool(string _key, bool _default = false)
{
#if USE_FIREBASE
return FirebaseTool.Instance.GetInt(_key, _default ? 1 : 0) == 1;
#endif
return m_sdkInterface.GetConfigBool(_key, _default);
}
#endregion
#region Others (common)
/// <summary>
/// review
/// </summary>
public void Review()
{
m_sdkInterface.Review();
}
/// <summary>
/// open privacy url
/// </summary>
public void OpenPrivacyURL()
{
m_sdkInterface.OpenPrivacyURL();
}
/// <summary>
/// open user agreement url
/// </summary>
public void OpenUserTermURL()
{
m_sdkInterface.OpenUserTermURL();
}
/// <summary>
/// open more game
/// </summary>
public void OpenMoreGame()
{
m_sdkInterface.OpenMoreGame();
}
/// <summary>
/// open url by browser
/// </summary>
/// <param name="_url"></param>
public void OpenUrlByBrowser(string _url)
{
m_sdkInterface.OpenUrlByBrowser(_url);
}
/// <summary>
/// shake
/// </summary>
/// <param name="_shakeType">0 light,1 medium,2 heavy</param>
/// <param name="_intensity">ios 0~1, android any num</param>
public void Shake(int _shakeType, float _intensity = 1)
{
m_sdkInterface.Shake(_shakeType, _intensity);
}
#endregion
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 76c8624dacb844b03bb8a32a7305348b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,202 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Touka;
public class TKGUtils
{
/// <summary>
/// 是否首次触达某个事件
/// </summary>
/// <param name="_key"></param>
/// <returns></returns>
public static bool IfFirstCheckPlayerPrefs(string _key)
{
var isFirstClick = GetPlayerPrefsIntByKey(_key) == 0;
SavePlayerPrefsIntByKeyValue(_key, 1);
return isFirstClick;
}
/// <summary>
/// 本地存int
///
/// key 内部拼接了前缀Touka_
/// </summary>
/// <param name="_key"></param>
/// <param name="_defaultValue"></param>
/// <returns></returns>
public static int GetPlayerPrefsIntByKey(string _key, int _defaultValue = 0)
{
int value = PlayerPrefs.GetInt(string.Format("{0}{1}", StaticStringsPlayerPrefs.TOUKA_PREFIX, _key), _defaultValue);
return value;
}
/// <summary>
/// 本地取int
///
/// key 内部拼接了前缀Touka_
/// </summary>
/// <param name="_key"></param>
/// <param name="_newValue"></param>
public static void SavePlayerPrefsIntByKeyValue(string _key, int _newValue)
{
PlayerPrefs.SetInt(string.Format("{0}{1}", StaticStringsPlayerPrefs.TOUKA_PREFIX, _key), _newValue);
PlayerPrefs.Save();
}
/// <summary>
/// 本地存string
///
/// key 内部拼接了前缀Touka_
/// </summary>
/// <param name="_key"></param>
/// <param name="_defaultValue"></param>
/// <returns></returns>
public static string GetPlayerPrefsStringByKey(string _key, string _defaultValue = "")
{
string value = PlayerPrefs.GetString(string.Format("{0}{1}", StaticStringsPlayerPrefs.TOUKA_PREFIX, _key), _defaultValue);
return value;
}
/// <summary>
/// 本地取string
///
/// key 内部拼接了前缀Touka_
/// </summary>
/// <param name="_key"></param>
/// <param name="_newValue"></param>
public static void SavePlayerPrefsStringByKeyValue(string _key, string _newValue)
{
PlayerPrefs.SetString(string.Format("{0}{1}", StaticStringsPlayerPrefs.TOUKA_PREFIX, _key), _newValue);
PlayerPrefs.Save();
}
/// <summary>
/// 缓存当前时间
/// </summary>
/// <param name="_key"></param>
public static void SaveCurrTime2PlayerPrefs(string _key)
{
DateTime date1 = DateTime.Now;
string s1 = date1.ToString();
SavePlayerPrefsStringByKeyValue(_key, s1);
}
/// <summary>
/// 缓存本地时间为string
/// </summary>
/// <param name="_key"></param>
/// <param name="_dateStr"></param>
public static void SaveCurrTime2PlayerPrefsWithStringDate(string _key, string _dateStr)
{
SavePlayerPrefsStringByKeyValue(_key, _dateStr);
}
/// <summary>
/// 取出缓存string时间为 DateTime
/// </summary>
/// <param name="_key"></param>
/// <returns></returns>
public static DateTime GetDateTimeFromPlayerPrefs(string _key)
{
string firstDateValue = GetPlayerPrefsStringByKey(_key);
if (string.IsNullOrEmpty(firstDateValue))
{
return new DateTime(1990, 1, 1, 0, 0, 0);
}
DateTime dateOld = Convert.ToDateTime(firstDateValue);
return dateOld;
}
/// <summary>
/// 判断是否为新用户
///
/// 距离首次登录时间间隔24h以内为新用户
/// </summary>
/// <returns></returns>
public static bool isNewUser()
{
DateTime dateCurr = DateTime.Now;
string firstDateValue = GetPlayerPrefsStringByKey(StaticStringsPlayerPrefs.FirstLoginTime);
if (string.IsNullOrEmpty(firstDateValue))
{
Debug.Log("存的值为空,为新用户");
return true;
}
Debug.Log("读取出来的值: " + firstDateValue + " 现在的时间值:" + dateCurr.ToString()); // 06/16/2019 19:46:57
DateTime dateOld = Convert.ToDateTime(firstDateValue);
TimeSpan timeSpan = dateCurr - dateOld;
Debug.Log("timeSpan.Seconds : " + timeSpan.TotalMinutes);
if (timeSpan.TotalMinutes >= 24 * 60)
{
Debug.Log("不是新用户了");
return false;
}
Debug.Log("是新用户");
return true;
}
/// <summary>
/// equal double
/// </summary>
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns></returns>
public static bool equalDouble(double a, double b)
{
if ((a - b > -0.000001) && (a - b) < 0.000001)
return true;
else
return false;
}
/// <summary>
/// Floats the equal.
/// </summary>
/// <returns><c>true</c>, if equal was floated, <c>false</c> otherwise.</returns>
/// <param name="a">The alpha component.</param>
/// <param name="b">The blue component.</param>
public static bool FloatEqual(float a, float b)
{
if ((a - b > -0.000001) && (a - b) < 0.000001)
{
return true;
}
else
{
return false;
}
}
public static string GetTodayDataStr()
{
string timeStr = DateTime.Now.ToString("yyyy-MM-dd");
return timeStr;
}
public static void OpenBrowserUrl(string _url)
{
Application.OpenURL(_url);
}
#region unity sdk only
public static void InitTenjinFirst()
{
ToukaUtils.InitTenjinFirst();
}
public static void ActiveAutoIV(bool pActive)
{
AutoIntersititialManager.Instance.ActiveLogic(pActive);
}
public static bool WillPlayInterstitial(bool pNormalIV = true)
{
return ToukaInterstitialTimer.Instance.CanShow(pNormalIV ? ToukaSDKManager.IVType.IV1 : ToukaSDKManager.IVType.IV2, true) && ToukaAdManager.Instance.IsReadyIntersitial();
}
#endregion
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 0c6bb316782354791a6df23332a4ee5e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -1,263 +0,0 @@
#if USE_FIREBASE
using System;
using System.Collections.Generic;
using UnityEngine;
using Firebase;
using Firebase.Analytics;
using Firebase.RemoteConfig;
using Touka;
public class FirebaseTool : NormalSingleton<FirebaseTool>
{
public event Action OnInitializeDone;
public event Action OnRemoteConfigSucceed;
public event Action OnRemoteConfigFail;
public bool IsReady => mIsReady;
private bool mIsReady = false;
private bool mIsDefaultConfigReady = false;
private bool mIsRemoteConfigReady = false;
private bool mIsConfigDone => mIsDefaultConfigReady && mIsRemoteConfigReady;
private Dictionary<string, object> mConfigDic = new Dictionary<string, object>();
public void Initialize()
{
foreach (string tKey in ToukaInnerParams.OnlineParamDic.Keys)//加入touka内置参数
{
mConfigDic.Add(tKey, ToukaInnerParams.OnlineParamDic[tKey]);
}
foreach (string tKey in TKGParams.OnlineParamDic.Keys)//加入自定义参数
{
mConfigDic.Add(tKey, TKGParams.OnlineParamDic[tKey]);
}
FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(pTask =>
{
DependencyStatus tStatus = pTask.Result;
if (tStatus == DependencyStatus.Available)
{
InitDone();
#if ANDROID_GP
FirebaseAnalytics.SetUserProperty("ALLOW_AD_PERSONALIZATION_SIGNALS", "true");
FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);
#endif
}
else
{
mIsReady = false;
Debug.LogError(string.Format("Could not resolve all Firebase dependencies: {0}", tStatus));
}
});
}
private void InitDone()
{
Debug.Log("Firebase init successfully!!");
mIsReady = true;
FirebaseApp.LogLevel = LogLevel.Debug;
OnInitializeDone?.Invoke();
InitRemoteConfig();
}
private void InitRemoteConfig()
{
FirebaseRemoteConfig.DefaultInstance.SetDefaultsAsync(mConfigDic).ContinueWith(t =>
{
mIsDefaultConfigReady = true;
Debug.Log("firebase default config ready");
});
FirebaseRemoteConfig.DefaultInstance.FetchAndActivateAsync().ContinueWith(t =>
{
mIsRemoteConfigReady = true;
Debug.Log("firebase remote config ready");
ConfigInfo tInfo = FirebaseRemoteConfig.DefaultInstance.Info;
switch (tInfo.LastFetchStatus)
{
case LastFetchStatus.Success:
Debug.Log(string.Format("Remote data loaded and ready (last fetch time {0}).", tInfo.FetchTime));
string tKVLog = "";
foreach (string tKey in TKGParams.OnlineParamDic.Keys)
{
tKVLog = tKey + "_" + TKGSDKManager.Instance.GetConfigStr(tKey);
TKGSDKManager.Instance.LogEvent(tKVLog);
Debug.Log("TKG get firebase remote config is: " + tKVLog);
}
foreach (string tKey in ToukaInnerParams.OnlineParamDic.Keys)
{
tKVLog = tKey + "_" + TKGSDKManager.Instance.GetConfigStr(tKey);
TKGSDKManager.Instance.LogEvent(tKVLog);
Debug.Log("TKG get firebase remote config is: " + tKVLog);
}
OnRemoteConfigSucceed?.Invoke();
break;
case LastFetchStatus.Failure:
switch (tInfo.LastFetchFailureReason)
{
case FetchFailureReason.Error:
Debug.Log("Fetch failed for unknown reason");
break;
case FetchFailureReason.Throttled:
Debug.Log("Fetch throttled until " + tInfo.ThrottledEndTime);
break;
}
OnRemoteConfigFail?.Invoke();
break;
case LastFetchStatus.Pending:
Debug.Log("Latest Fetch call still pending.");
OnRemoteConfigFail?.Invoke();
break;
}
});
}
public void LogEvent(string pEvtName)
{
if (!mIsReady)
return;
Debug.Log("Firebase log event : " + pEvtName);
FirebaseAnalytics.LogEvent(pEvtName);
}
public void LogEvent(string pEvtName, string pEvtParam, string pEvtValue)
{
if (!mIsReady)
return;
FirebaseAnalytics.LogEvent(pEvtName, pEvtParam, pEvtValue);
}
public void LogEvent(string pEvtName, Dictionary<string, string> pParamDic)
{
if (!mIsReady)
return;
Parameter[] tParams = new Parameter[pParamDic.Count];
int tIndex = 0;
foreach (string tParamName in pParamDic.Keys)
{
tParams[tIndex] = new Parameter(tParamName, pParamDic[tParamName]);
tIndex++;
}
FirebaseAnalytics.LogEvent(pEvtName, tParams);
}
public string GetString(string pKey, string pDefault = "")
{
#if UNITY_EDITOR
if (mConfigDic.ContainsKey(pKey))
return mConfigDic[pKey].ToString();
return pDefault;
#endif
if (!(mIsReady && mIsConfigDone))
return mConfigDic[pKey].ToString();
return FirebaseRemoteConfig.DefaultInstance.GetValue(pKey).StringValue;
}
public int GetInt(string pKey, int pDefault = 0)
{
#if UNITY_EDITOR
if (mConfigDic.ContainsKey(pKey))
return int.Parse(mConfigDic[pKey].ToString());
return pDefault;
#endif
if (!(mIsReady && mIsConfigDone))
return int.Parse(mConfigDic[pKey].ToString());
return (int)FirebaseRemoteConfig.DefaultInstance.GetValue(pKey).LongValue;
}
public bool GetBool(string pKey, bool pDefault = false)
{
#if UNITY_EDITOR
if (mConfigDic.ContainsKey(pKey))
return bool.Parse(mConfigDic[pKey].ToString());
return pDefault;
#endif
if (!(mIsReady && mIsConfigDone))
return bool.Parse(mConfigDic[pKey].ToString());
return FirebaseRemoteConfig.DefaultInstance.GetValue(pKey).BooleanValue;
}
public double GetDouble(string pKey, double pDefault = 0)
{
#if UNITY_EDITOR
if (mConfigDic.ContainsKey(pKey))
return double.Parse(mConfigDic[pKey].ToString());
return pDefault;
#endif
if (!(mIsReady && mIsConfigDone))
return double.Parse(mConfigDic[pKey].ToString());
return FirebaseRemoteConfig.DefaultInstance.GetValue(pKey).DoubleValue;
}
#if ANDROID_GP
private const string AD_REVENUE = "ad_revenue";
private const string EVENT_SINGLE_REVENUE = "Single_Ads_Revenue";
private const string EVENT_ACCUMULATIVE_REVENUE = "Total_Ads_Revenue";
public void RecordAdRevenue(MaxSdkBase.AdInfo pAdInfo, string pAdType)
{
if (pAdInfo.Revenue > 0)
{
double tAddRevenue = pAdInfo.Revenue;
//log single revenue
LogAdRevenueEvent(EVENT_SINGLE_REVENUE, pAdInfo, pAdType);
//log accumulative revenue
float tBeforeRevenue = PlayerPrefs.GetFloat(AD_REVENUE, 0);
float tTotalRevenue = (float)(tAddRevenue + tBeforeRevenue);
if (tTotalRevenue >= 0.01)
{
LogAdRevenueEvent(EVENT_ACCUMULATIVE_REVENUE, pAdInfo, pAdType);
PlayerPrefs.SetFloat(AD_REVENUE, 0);
}
else
{
PlayerPrefs.SetFloat(AD_REVENUE, tTotalRevenue);
}
}
}
private void LogAdRevenueEvent(string pEventName, MaxSdkBase.AdInfo pAdInfo, string pAdType)
{
if (!mIsReady)
return;
if (pAdInfo != null)
{
Parameter[] tEventParams =
{
new Parameter("ad_platform", "Max"),
new Parameter("ad_source", pAdInfo.NetworkName),
new Parameter("ad_unit_name", pAdInfo.AdUnitIdentifier),
new Parameter(FirebaseAnalytics.ParameterCurrency,"USD"),
new Parameter("value", pAdInfo.Revenue),
new Parameter("ad_type",pAdType)
};
FirebaseAnalytics.LogEvent(pEventName, tEventParams);
}
}
#endif
}
#endif

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: c7349a7c3d6cb4bf182e0fa3b525953b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,199 +0,0 @@
#if USE_IAP
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Purchasing;
public class IAPTool : NormalSingleton<IAPTool>, IStoreListener
{
public event Action<string, bool> OnPurchaseDone;
public event Action<bool> OnRestoreDone;
public bool IsRestoring => mIsRestoring;
private bool mIsRestoring = false;
private static IStoreController m_StoreController; // 存储商品信息;
private static IExtensionProvider m_StoreExtensionProvider; // IAP扩展工具;
private bool m_PurchaseInProgress = false; // 是否处于付费中;
public void Initialize()
{
if (m_StoreController == null && m_StoreExtensionProvider == null)
InitUnityPurchase();
}
private bool IsInitialized()
{
return m_StoreController != null && m_StoreExtensionProvider != null;
}
// 初始化IAP;
private void InitUnityPurchase()
{
if (IsInitialized()) return;
// 标准采购模块;
StandardPurchasingModule module = StandardPurchasingModule.Instance();
// 配置模式;
ConfigurationBuilder builder = ConfigurationBuilder.Instance(module);
// 注意ProductType的类型Consumable是可以无限购买(比如水晶)NonConsumable是只能购买一次(比如关卡)Subscription是每月订阅(比如VIP);
// 这里初始化没有添加平台信息因为平台信息有的时候还存在bug如果必须添加也可以添加没有问题确保平台信息添加正确就行了。
foreach (string tID in IAPProducts.ProductDic.Keys)
{
builder.AddProduct(tID, IAPProducts.ProductDic[tID]);
}
//初始化;
UnityPurchasing.Initialize(this, builder);
}
#region Public Func
// 根据ID给购买商品;
public void BuyProductByID(string productId)
{
if (IsInitialized())
{
if (m_PurchaseInProgress == true) return;
Product product = m_StoreController.products.WithID(productId);
if (product != null && product.availableToPurchase)
{
m_PurchaseInProgress = true;
Debug.Log(string.Format("Purchasing product asychronously: '{0}'", product.definition.id));
m_StoreController.InitiatePurchase(product);
}
else
{
Debug.Log("BuyProductID: FAIL. Not purchasing product, either is not found or is not available for purchase");
}
}
else
{
Debug.Log("BuyProductID FAIL. Not initialized.");
}
}
// 确认购买产品成功;
public void DoConfirmPendingPurchaseByID(string productId)
{
Product product = m_StoreController.products.WithID(productId);
if (product != null && product.availableToPurchase)
{
if (m_PurchaseInProgress)
{
m_StoreController.ConfirmPendingPurchase(product);
m_PurchaseInProgress = false;
}
}
}
// 恢复购买;
public void RestorePurchases()
{
if (!IsInitialized())
{
OnRestoreDone?.Invoke(false);
Debug.Log("RestorePurchases FAIL. Not initialized.");
return;
}
if (Application.platform == RuntimePlatform.IPhonePlayer ||
Application.platform == RuntimePlatform.OSXPlayer)
{
Debug.Log("RestorePurchases started ...");
mIsRestoring = true;
var apple = m_StoreExtensionProvider.GetExtension<IAppleExtensions>();
apple.RestoreTransactions((result) => {
mIsRestoring = false;
OnRestoreDone?.Invoke(result);
// 返回一个bool值如果成功则会多次调用支付回调然后根据支付回调中的参数得到商品id最后做处理(ProcessPurchase);
Debug.Log("RestorePurchases continuing: " + result + ". If no further messages, no purchases available to restore.");
});
}
else
{
Debug.Log("RestorePurchases FAIL. Not supported on this platform. Current = " + Application.platform);
}
}
#endregion
#region IStoreListener Callback
// IAP初始化成功回掉函数;
public void OnInitialized(IStoreController controller, IExtensionProvider extensions)
{
Debug.Log("IAP initialize Succeed!");
m_StoreController = controller;
m_StoreExtensionProvider = extensions;
// 这里可以获取您在AppStore和Google Play 上配置的商品;
ProductCollection products = m_StoreController.products;
Product[] all = products.all;
for (int i = 0; i < all.Length; i++)
{
Debug.Log(all[i].metadata.localizedTitle + "|" + all[i].metadata.localizedPriceString + "|" + all[i].metadata.localizedDescription + "|" + all[i].metadata.isoCurrencyCode);
}
#if UNITY_IOS
m_StoreExtensionProvider.GetExtension<IAppleExtensions>().RegisterPurchaseDeferredListener(OnDeferred);
#endif
}
// IAP初始化失败回掉函数没有网络的情况下并不会调起而是一直等到有网络连接再尝试初始化;
public void OnInitializeFailed(InitializationFailureReason error)
{
switch (error)
{
case InitializationFailureReason.AppNotKnown:
Debug.LogError("Is your App correctly uploaded on the relevant publisher console?");
break;
case InitializationFailureReason.PurchasingUnavailable:
Debug.Log("Billing disabled! Ask the user if billing is disabled in device settings.");
break;
case InitializationFailureReason.NoProductsAvailable:
Debug.Log("No products available for purchase! Developer configuration error; check product metadata!");
break;
}
}
// 支付成功处理函数;
public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
{
m_PurchaseInProgress = false;
Debug.Log("Purchase OK: " + e.purchasedProduct.definition.id);
// 消息结构 : Receipt: {"Store":"fake","TransactionID":"9c5c16a5-1ae4-468f-806d-bc709440448a","Payload":"{ \"this\" : \"is a fake receipt\" }"};
Debug.Log("Receipt: " + e.purchasedProduct.receipt);
OnPurchaseDone?.Invoke(e.purchasedProduct.definition.id, true);
// 我们自己后台完毕的话,通过代码设置成功(如果是不需要后台设置直接设置完毕不要设置Pending);
return PurchaseProcessingResult.Complete;
}
// 支付失败回掉函数;
public void OnPurchaseFailed(Product item, PurchaseFailureReason r)
{
Debug.Log("Purchase OK: " + item.definition.id);
m_PurchaseInProgress = false;
OnPurchaseDone?.Invoke(item.definition.id, false);
}
// 购买延迟提示(这个看自己项目情况是否处理);
public void OnDeferred(Product item)
{
Debug.Log("Purchase deferred: " + item.definition.id);
OnPurchaseDone?.Invoke(item.definition.id, false);
}
// 恢复购买功能执行回掉函数;
public void OnTransactionsRestored(bool success)
{
Debug.Log("Transactions restored : " + success);
}
#endregion
}
#endif

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 491772b3b6ab14cc9ad93ca3372753d2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,18 +0,0 @@
using System;
public abstract class NormalSingleton<T> where T : NormalSingleton<T>, new()
{
private static T mInstance = null;
public static T Instance
{
get
{
if (mInstance == null)
{
mInstance = new T();
}
return mInstance;
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 5f879dddbadcb47c59a66e24e018e1b4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -1,302 +0,0 @@
using System;
using System.Collections.Generic;
namespace Touka
{
public interface ITKGSDK
{
/// <summary>
/// init sdk
/// </summary>
void InitSDK(Action _initCallback = null);
/// <summary>
/// Set game focus
/// </summary>
/// <param name="_gameFocusAction"></param>
void SetGameFocusListener(Action<bool> _gameFocusAction);
/// <summary>
/// Get channel
/// </summary>
/// <returns></returns>
AppChannel GetChannel();
#region Ads
/// <summary>
/// Show banner
/// </summary>
/// <param name="_pos">1:top,2:bottom</param>
void ShowBanner(int _pos);
/// <summary>
/// Hide banner
/// </summary>
void HideBanner();
/// <summary>
/// ShowNative
/// </summary>
/// <param name="nativePos"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="width"></param>
/// <param name="height"></param>
void ShowNative(string nativePos, float x, float y, float width, float height);
/// <summary>
/// HideNative
/// </summary>
void HideNative();
/// <summary>
/// Is Ready Native
/// </summary>
/// <returns></returns>
bool IsNativeReady();
/// <summary>
/// Play Interstitial Ad
/// </summary>
/// <param name="adPos"></param>
/// <param name="callback"></param>
/// <param name="IvType"></param>
void PlayInterstitialAd(string _adPos, Action _callback = null, IVADType _IvType = IVADType.IV1);
/// <summary>
/// Play Reward Ad
/// </summary>
/// <param name="_adPos"></param>
/// <param name="_rewardCallback"></param>
/// <param name="_playFailedCallback"></param>
void PlayRewardAd(string _adPos, Action<bool> _rewardCallback = null, Action _playFailedCallback = null);
/// <summary>
/// Is Ready Reward
/// </summary>
/// <returns></returns>
bool IsReadyRewardAd();
/// <summary>
/// Is Ready Interstitial
/// </summary>
/// <returns></returns>
bool IsReadyInterstitialAd();
#endregion
#region Log Event
#region Normal
/// <summary>
/// log event
/// </summary>
/// <param name="_eventSort"></param>
void LogEvent(string _eventSort);
/// <summary>
/// log event
/// </summary>
/// <param name="_eventSort"></param>
/// <param name="_key"></param>
/// <param name="_value"></param>
void LogEvent(string _eventSort, string _key, string _value);
/// <summary>
/// log event
/// </summary>
/// <param name="_eventSort"></param>
/// <param name="_key01"></param>
/// <param name="_value01"></param>
/// <param name="_key02"></param>
/// <param name="_value02"></param>
void LogEvent(string _eventSort, string _key01, string _value01, string _key02, string _value02);
/// <summary>
/// log event
/// </summary>
/// <param name="_eventSort"></param>
/// <param name="_eventDic"></param>
void LogEvent(string _eventSort, Dictionary<string, string> _eventDic = null);
#endregion
#region Level Event
/// <summary>
/// Notify game start
/// </summary>
/// <param name="_level"></param>
void NotifyGameStart(int _level);
/// <summary>
/// Notify game start
/// </summary>
/// <param name="_level"></param>
void NotifyGameStart(string _level);
/// <summary>
/// Notify game end
/// </summary>
/// <param name="_level"></param>
/// <param name="_win"></param>
bool NotifyGameEnd(int _level, bool _win);
/// <summary>
/// Notify game end
/// </summary>
/// <param name="_level"></param>
/// <param name="_win"></param>
bool NotifyGameEnd(string _level, bool _win);
#endregion
#region Reward Ad Button Show
/// <summary>
/// Log Reward ad button show
/// </summary>
/// <param name="_pos"></param>
void LogRewardAdBtnShow(string _pos);
#endregion
#region Tracking Event
/// <summary>
/// Log Tracking Event
/// </summary>
/// <param name="_eventType"></param>
void LogTrackingEvent(TrackingEventType _eventType);
#endregion
#endregion
#region Online Config
/// <summary>
/// get config - string
/// </summary>
/// <param name="_key"></param>
/// <param name="_default"></param>
/// <returns></returns>
string GetConfigStr(string _key, string _default = "");
/// <summary>
/// get config - int
/// </summary>
/// <param name="_key"></param>
/// <param name="_default"></param>
/// <returns></returns>
int GetConfigInt(string _key, int _default = 0);
/// <summary>
/// get config - bool
/// </summary>
/// <param name="_key"></param>
/// <param name="_default"></param>
/// <returns></returns>
bool GetConfigBool(string _key, bool _default = false);
#endregion
#region Otherscommon
/// <summary>
/// review
/// </summary>
void Review();
/// <summary>
/// open privacy url
/// </summary>
void OpenPrivacyURL();
/// <summary>
/// open user term url
/// </summary>
void OpenUserTermURL();
/// <summary>
/// open more game
/// </summary>
void OpenMoreGame();
/// <summary>
/// open browser url
/// </summary>
/// <param name="_url"></param>
void OpenUrlByBrowser(string _url);
/// <summary>
/// shake
/// </summary>
/// <param name="_shakeType">0 light,1 medium,2 heavy</param>
/// <param name="_intensity">ios 0~1, android any num</param>
void Shake(int _shakeType, float _intensity = 1);
#endregion
#region Others (unCommon)
#endregion
}
/// <summary>
/// IV Ad Type
/// Control different frequency interstitial Ads
/// </summary>
public enum IVADType
{
IV1 = 0,
IV2,
MAX,
}
/// <summary>
/// Tracking Event Type
/// </summary>
public enum TrackingEventType
{
GuildStart = 0, // guide start show
GuildEnd = 1, // guild end
FirstOperateGame = 2, // user operates the game for the first time
Max,
}
/// <summary>
/// ad show failed code type
/// </summary>
public enum AdShowFailCodeType
{
AdShowFailReal = 57, // ad real show failed
AdIsNotReady = 58, // The ad component is displayed and found not ready
AdIsReadyCannotShow = 59, // When the ad component is displayed, the ad is ready, but the rule that cannot display the ad is triggered
}
public enum AppChannel
{
None,
AppStore_GB,
AppStore_CN,
GooglePlay,
DY012,
GW002,
HY003,
OP004,
VO005,
XM006,
HW007,
TX008,
TP009,
MM010,
ZX011,
KS012,
PJ000
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 622e60b39ae0b411f9b149c5f416bebe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,455 +0,0 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Touka
{
public class TKGSDKUnity : ITKGSDK
{
private int mLoginCount
{
get => PlayerPrefs.GetInt(nameof(mLoginCount), 0);
set => PlayerPrefs.SetInt(nameof(mLoginCount), value);
}
private int mPassCount
{
get => PlayerPrefs.GetInt(nameof(mPassCount), 0);
set => PlayerPrefs.SetInt(nameof(mPassCount), value);
}
private bool mHasPoppedReview
{
get => PlayerPrefs.GetInt(nameof(mHasPoppedReview), 0) == 1;
set => PlayerPrefs.SetInt(nameof(mHasPoppedReview), value? 1 : 0);
}
private Action mInitCallback;
/// <summary>
/// init sdk
/// </summary>
/// <param name="_initCallback"></param>
public void InitSDK(Action _initCallback = null)
{
mInitCallback = _initCallback;
Debug.Log("TKGSDKUnity init sdk ---");
ToukaSDKManager.Instance.initAnalytics();
ToukaSDKManager.Instance.initAdsSDK();
#if UNITY_EDITOR
mInitCallback?.Invoke();
#elif IOS_CN
// iOS CN need Anti-addiction
TGTools.Instance.onAgreeHander += ShowAntiAddiction;
TGTools.Instance.ShowUserAgreementView(TKGBasicConfig.content, TKGBasicConfig.age, TKGBasicConfig.PrivacyURL, TKGBasicConfig.AgreementURL);
#elif ANDROID_TW
TGTools.Instance.OnAndroidInitSucceed = mInitCallback;
TGTools.Instance.Ini();
#else
ToukaSDKManager.Instance.initAnalytics();
ToukaSDKManager.Instance.initAdsSDK();
mInitCallback?.Invoke();
#endif
mLoginCount++;
AutoIntersititialManager.Instance.Init();
}
/// <summary>
/// Anti callback
/// </summary>
private void ShowAntiAddiction()
{
TGTools.Instance.onAgreeHander -= ShowAntiAddiction;
ToukaUtils.InitTenjinFirst();
TGiOSAdManager.Instance.onAntiSuccessHander += AntiSucceed;
TGiOSAdManager.Instance.ShowAntiView();
}
/// <summary>
/// Anti succ callback
/// </summary>
private void AntiSucceed()
{
TGiOSAdManager.Instance.onAntiSuccessHander -= AntiSucceed;
mInitCallback?.Invoke();
}
/// <summary>
/// Set game focus
/// </summary>
/// <param name="_gameFocusAction"></param>
public void SetGameFocusListener(Action<bool> _gameFocusAction)
{
ToukaAdManager.Instance.SetGameFocusAction(_gameFocusAction);
}
/// <summary>
/// Get channel
/// </summary>
/// <returns></returns>
public AppChannel GetChannel()
{
return AppChannel.None;
}
#region Ads
/// <summary>
/// Show banner
/// </summary>
/// <param name="_pos">1:top,2:bottom</param>
public void ShowBanner(int _pos)
{
ToukaSDKManager.Instance.ShowOrHideBanner(true);
}
/// <summary>
/// Hide banner
/// </summary>
public void HideBanner()
{
ToukaSDKManager.Instance.ShowOrHideBanner(false);
}
/// <summary>
/// ShowNative
/// </summary>
/// <param name="nativePos"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="width"></param>
/// <param name="height"></param>
public void ShowNative(string nativePos, float x, float y, float width, float height)
{
#if UNITY_IOS
ToukaAdManager.Instance.ShowNative(x, y, width, height, nativePos);
#endif
}
/// <summary>
/// HideNative
/// </summary>
public void HideNative()
{
#if UNITY_IOS
ToukaAdManager.Instance.HideNative(false);
#endif
}
/// <summary>
/// Is Ready Native
/// </summary>
/// <returns></returns>
public bool IsNativeReady()
{
#if UNITY_IOS
return ToukaAdManager.Instance.IsReadyNative;
#else
return false;
#endif
}
/// <summary>
/// Play Interstitial Ad
/// </summary>
/// <param name="_adPos"></param>
/// <param name="_callback"></param>
/// <param name="_IvType"></param>
public void PlayInterstitialAd(string _adPos, Action _callback = null, IVADType _IvType = IVADType.IV1)
{
ToukaSDKManager.Instance.PlayInterstitialAd(_adPos, _callback, (ToukaSDKManager.IVType)((int)_IvType));
}
/// <summary>
/// Play Reward Ad
/// </summary>
/// <param name="_adPos"></param>
/// <param name="_rewardCallback"></param>
/// <param name="_playFailedCallback"></param>
public void PlayRewardAd(string _adPos, Action<bool> _rewardCallback = null, Action _playFailedCallback = null)
{
ToukaSDKManager.Instance.PlayRewardAd(_adPos, () => _rewardCallback?.Invoke(true), _playFailedCallback);
}
/// <summary>
/// Is Ready Interstitial
/// </summary>
/// <returns></returns>
public bool IsReadyInterstitialAd()
{
return ToukaAdManager.Instance.IsReadyIntersitial();
}
/// <summary>
/// Is Ready Reward
/// </summary>
/// <returns></returns>
public bool IsReadyRewardAd()
{
return ToukaAdManager.Instance.IsReadyVideo;
}
#endregion
#region Log Event
#region Normal
/// <summary>
/// Log Event
/// </summary>
/// <param name="_eventSort"></param>
public void LogEvent(string _eventSort)
{
ToukaSDKManager.Instance.LogEventByUmeng(_eventSort);
}
/// <summary>
/// Log Event
/// </summary>
/// <param name="_eventSort"></param>
/// <param name="_key"></param>
/// <param name="_value"></param>
public void LogEvent(string _eventSort, string _key, string _value)
{
ToukaSDKManager.Instance.LogEventByUmeng(_eventSort, _key, _value);
}
/// <summary>
/// Log Event
/// </summary>
/// <param name="_eventSort"></param>
/// <param name="_key01"></param>
/// <param name="_value01"></param>
/// <param name="_key02"></param>
/// <param name="_value02"></param>
public void LogEvent(string _eventSort, string _key01, string _value01, string _key02, string _value02)
{
ToukaSDKManager.Instance.LogEventByUmeng(_eventSort, _key01, _value01, _key02, _value02);
}
/// <summary>
/// Log Event
/// </summary>
/// <param name="_eventSort"></param>
/// <param name="_eventDic"></param>
public void LogEvent(string _eventSort, Dictionary<string, string> _eventDic = null)
{
ToukaSDKManager.Instance.LogEventByUmeng(_eventSort, _eventDic);
}
#endregion
#region Level Event
/// <summary>
/// Notify game start
/// </summary>
/// <param name="_level"></param>
public void NotifyGameStart(int _level)
{
NotifyGameStart(_level.ToString());
}
/// <summary>
/// Notify game start
/// </summary>
/// <param name="_level"></param>
public void NotifyGameStart(string _level)
{
ToukaStageCommonEvent.Instance.StageStartEvent(_level);
}
/// <summary>
/// Notify game end
/// </summary>
/// <param name="_level"></param>
/// <param name="_win"></param>
public bool NotifyGameEnd(int _level, bool _win)
{
return NotifyGameEnd(_level.ToString(), _win);
}
/// <summary>
/// Notify game end
/// </summary>
/// <param name="_level"></param>
/// <param name="_win"></param>
public bool NotifyGameEnd(string _level, bool _win)
{
if (_win)
{
mPassCount++;
ToukaStageCommonEvent.Instance.StageSuccessEvent(_level);
}
else
{
ToukaStageCommonEvent.Instance.StageFailureEvent(_level);
}
ToukaUtils.CheckPassLvAndAdEvent(mPassCount);
return !CheckReviewPop(mPassCount);
}
private bool CheckReviewPop(int pLevel)
{
if (mHasPoppedReview)
return false;
if (mLoginCount == 1 && pLevel == StaticOtherConfig.FirstLoginPopLevel)
{
Debug.Log("pop first review");
mHasPoppedReview = true;
Review();
return true;
}
else if (mLoginCount > 1 && pLevel == StaticOtherConfig.OtherLoginPopLevel)
{
Debug.Log("pop other review");
mHasPoppedReview = true;
Review();
return true;
}
return false;
}
#endregion
#region Reward Ad Button Show
/// <summary>
/// Log Reward ad button show
/// </summary>
/// <param name="_pos"></param>
public void LogRewardAdBtnShow(string _pos)
{
ToukaSDKManager.Instance.LogEventByUmengAdShow(_pos);
}
#endregion
#region Tracking Event
/// <summary>
/// Log Tracking Event
/// </summary>
/// <param name="_eventType"></param>
public void LogTrackingEvent(TrackingEventType _eventType)
{
ToukaAnalyticsManager.Instance.LogEvent(ToukaLogType.Tenjin, _eventType.ToString());
}
#endregion
#endregion
#region Online Config
/// <summary>
/// get config - string
/// </summary>
/// <param name="_key"></param>
/// <param name="_default"></param>
/// <returns></returns>
public string GetConfigStr(string _key, string _default = "")
{
string tValue = StaticOnlineParams.Instance.GetOnlineValue(_key); //todo:待优化,读配置文件
if (!string.IsNullOrEmpty(tValue))
{
return tValue;
}
return _default;
}
/// <summary>
/// get config - int
/// </summary>
/// <param name="_key"></param>
/// <param name="_default"></param>
/// <returns></returns>
public int GetConfigInt(string _key, int _default = 0)
{
string tValue = GetConfigStr(_key, _default.ToString());
if (int.TryParse(tValue, out int tIntVal))
{
return tIntVal;
}
return _default;
}
/// <summary>
/// get config - bool
/// </summary>
/// <param name="_key"></param>
/// <param name="_default"></param>
/// <returns></returns>
public bool GetConfigBool(string _key, bool _default = false)
{
int tIntValue = GetConfigInt(_key, _default ? 1 : 0);
return tIntValue != 0;
}
#endregion
#region Others (common)
/// <summary>
/// review
/// </summary>
public void Review()
{
ToukaUtils.OpenSystemReviewPop();
}
/// <summary>
/// open privacy url
/// </summary>
public void OpenPrivacyURL()
{
ToukaUtils.OpenPrivacyURL();
}
/// <summary>
/// open user agreement url
/// </summary>
public void OpenUserTermURL()
{
ToukaUtils.OpenUserPolicy();
}
/// <summary>
/// open more game
/// </summary>
public void OpenMoreGame()
{
ToukaUtils.OpenMoreGames();
}
public void OpenUrlByBrowser(string _url)
{
ToukaUtils.OpenBrowserUrl(_url);
}
/// <summary>
/// shake
/// </summary>
/// <param name="_shakeType">0 light,1 medium,2 heavy</param>
/// <param name="_intensity">ios 0~1, android any num</param>
public void Shake(int _shakeType, float _intensity = 1)
{
}
#endregion
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ca8a88170bf9d49a9b7cf61274d3b053
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,45 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Touka
{
/// <summary>
/// 单例类
/// </summary>
/// <typeparam name="T"></typeparam>
public class TKGSingleton<T> : MonoBehaviour where T : MonoBehaviour
{
private static T _instance;
public static T Instance
{
get
{
if (null == _instance)
{
_instance = Object.FindObjectOfType(typeof(T)) as T;
if (null != _instance) return _instance;
GameObject container = new GameObject
{
name = typeof(T).ToString()
};
container.hideFlags = HideFlags.HideInHierarchy;
_instance = container.AddComponent(typeof(T)) as T;
Object.DontDestroyOnLoad(container);
}
return _instance;
}
}
private void Awake()
{
OnInstanceCreate();
}
protected virtual void OnInstanceCreate()
{
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: da622b24dd1d24cfe97ee17033dd2cb0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

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

View File

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

View File

@ -1,74 +0,0 @@
using System;
using UnityEngine;
#if !TOUKA_TEST
#if UNITY_ANDROID
public static partial class StaticStringsKey
{
#if ANDROID_CN
// topon
public const string TOPON_APPID = "a619c9a2c1c531";
public const string TOPON_APPKEY = "c13e4357e57d78e76e472899eb182e98";
public const string IntersUnitId = "b619c9aec2bd23";
public const string RewardVideoUnitId = "b619c9ad5bc6cd";
public const string NativeUnitId = "";
public const string OpenscreenId = "b619c9af77b9c9";
public const string NativeBannerUnitId = "";
public const string GADValue = "ca-app-pub-3916046151571724~8559386104";
#elif ANDROID_TW
public const string TOPON_APPID = "a607acb6913054";
public const string TOPON_APPKEY = "c13e4357e57d78e76e472899eb182e98";
public const string IntersUnitId = "40a4ef2f4431ef15";
public const string RewardVideoUnitId = "a90b2ddd81e10daa";
public const string NativeUnitId = "b608251153978a";
public const string OpenscreenId = "b6082513e30bd0";
public const string NativeBannerUnitId = "b6083a3a129482";
public const string GADValue = "ca-app-pub-3916046151571724~8559386104";
#elif ANDROID_GP
public const string TOPON_APPID = "";
public const string TOPON_APPKEY = "";
public const string IntersUnitId = "728e3722f4d9c6fd";
public const string RewardVideoUnitId = "aab69171cbb875b6";
public const string NativeUnitId = "";
public const string OpenscreenId = "";
public const string NativeBannerUnitId = "";
public const string GADValue = "ca-app-pub-3916046151571724~8559386104";
#else
public const string TOPON_APPID = "";
public const string TOPON_APPKEY = "";
public const string IntersUnitId = "";
public const string RewardVideoUnitId = "";
public const string NativeUnitId = "";
public const string OpenscreenId = "";
public const string NativeBannerUnitId = "";
public const string GADValue = "ca-app-pub-3916046151571724~8559386104";
#endif
// touka sdk
public const string TOUKA_SDK_APPID = TOPON_APPID;
public const string TOUKA_SDK_APPKEY = TOPON_APPKEY;
public const string TOUKA_SDK_BANNERID = NativeBannerUnitId;
public const string TOUKA_SDK_INTERID = IntersUnitId;
public const string TOUKA_SDK_REWARDID = RewardVideoUnitId;
public const string TOUKA_SDK_NATIVEID = NativeUnitId;
public const string TOUKA_SDK_SPLASHID = OpenscreenId;
// 广告开关
public const bool BannerSwitch = false; // banner开关
public const bool InterSwitch = true; // 插屏开关
public const bool RewardSwitch = true; // 激励视频开关
public const bool NativeSwitch = false; // native开关
public const bool SplashSwitch = true; // 开屏开关
}
#endif
#endif

View File

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 1a632ce99131541df9a99079903ac962
timeCreated: 1554361329
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,94 +0,0 @@
#if !TOUKA_TEST
#if UNITY_IOS
/// <summary>
/// 广告ID相关配置
/// </summary>
public static partial class StaticStringsKey {
#region
#if IOS_CN
// admob
public const string GADValue = "ca-app-pub-3916046151571724~3382441071";
#else
// admob
public const string GADValue = "ca-app-pub-3916046151571724~3382441071"; // admob id
#endif
// topon(cn) - 国内版本用Topon
public const string TOPON_APPID = "a605885616c9c2"; // topon appid
public const string TOPON_APPKEY = "c13e4357e57d78e76e472899eb182e98"; // topon appkey - 同一个账号key相同
public const string TOPON_IntersUnitId = "b605885cf82614"; // topon 插屏id
public const string TOPON_RewardVideoUnitId = "b605885e3d7950"; // topon 激励视频id
public const string TOPON_OriginOpenScreenId = "b620b7ff8b4dc2"; // topon 原始开屏id非native拼
public const string TOPON_NativeUnitId = ""; // topon native id
public const string TOPON_NativeOpenscreenId = "b620b7ff8b4dc2"; // topon native拼开屏id
public const string TOPON_NativeBannerUnitId = ""; // topon native拼banner id
// max (us) - 海外版本用max
public const string MAX_AppLovinSdkKey = "QVt-ZBOR44Frm2Ub8gEfbPo-K8SeKHvyzoq-TJ3op08cFx29THV9DviWinxrQBxNePGKU14gHOkClTrNOi_1a9"; // max key- 同一个账号key相同
public const string MAX_IV = "70232343fc36c2df"; // max 插屏id
public const string MAX_RV = "f39092451ad4cee2"; // max 激励视频id
public const string MAX_NATIVE_TEMPLATE = "";
public const string MAX_MATIVE_MANUAL = "";
public const string MAX_BANNER = "";
// 广告开关
public const bool BannerSwitch = false; // banner开关
public const bool InterSwitch = true; // 插屏开关
public const bool RewardSwitch = true; // 激励视频开关
public const bool NativeSwitch = false; // native开关
public const bool SplashSwitch = true; // 开屏开关 //
#endregion
#region pangle pangle sdk才需要修改
// pangle sdk(cn) - pangle 看运营需求,有需要才需要修改。
public const string PANGLE_APPID = "5180758"; // pangle id
public const string PANGLE_IntersUnitId = "946231416"; // pangle 插屏id
public const string PANGLE_RewardVideoUnitId = "946231404"; // pangle 激励视频id
public const string PANGLE_NativeUnitId = "946231621"; // pangle native id
public const string PANGLE_OriginOpenScreenId = "887492428"; // pangle 原始开屏id非native拼
#endregion
#region sdk
// touka sdk
public const string TOUKA_SDK_APPKEY = TOPON_APPKEY;
public const string TOUKA_SDK_SPLASHID = TOPON_NativeOpenscreenId;
#if IOS_CN
#if PANGLE
public const string TOUKA_SDK_APPID = PANGLE_APPID;
public const string TOUKA_SDK_INTERID = PANGLE_IntersUnitId;
public const string TOUKA_SDK_REWARDID = PANGLE_RewardVideoUnitId;
public const string TOUKA_SDK_NATIVEID = PANGLE_NativeUnitId;
public const string TOUKA_SDK_ORIGINSPLASHID = PANGLE_OriginOpenScreenId;
public const string TOUKA_SDK_BANNERID = "";
#else
public const string TOUKA_SDK_APPID = TOPON_APPID;
public const string TOUKA_SDK_INTERID = TOPON_IntersUnitId;
public const string TOUKA_SDK_REWARDID = TOPON_RewardVideoUnitId;
public const string TOUKA_SDK_NATIVEID = TOPON_NativeUnitId;
public const string TOUKA_SDK_ORIGINSPLASHID = TOPON_OriginOpenScreenId;
public const string TOUKA_SDK_BANNERID = TOPON_NativeBannerUnitId;
#endif
#else
public const string TOUKA_SDK_APPID = TOPON_APPID;
public const string TOUKA_SDK_INTERID = MAX_IV;
public const string TOUKA_SDK_REWARDID = MAX_RV;
public const string TOUKA_SDK_NATIVEID = TOPON_NativeUnitId;
public const string TOUKA_SDK_ORIGINSPLASHID = TOPON_OriginOpenScreenId;
public const string TOUKA_SDK_BANNERID = MAX_BANNER;
#endif
#endregion
}
#endif
#endif

View File

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 69ae3f27c8f43459ba6adbe329f37c35
timeCreated: 1554361302
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -1,44 +0,0 @@
using System;
using UnityEngine;
#if !TOUKA_TEST
#if UNITY_ANDROID
public static partial class StaticStringsKey
{
// apple app id
public const string APPLE_APP_ID = "1560492384";
// umeng
public const string UMENG_APPKEY = "61ade15097ce9017802ca150";
public const string UMENG_CHANNELID = "Android";
// ga
public const string GA_gameKey = "94c81066a5c5694eacaa8a2fda000dde";
public const string GA_secretKey = "de3f86f93cfa9a89fda3b8176a1acd4f34a1bd0e";
// tenjin
public const string TENJIN_KEY = "PYOTVKJ4XZJHSMZW2V6GBQRCNXAFKWU2";
// review url
public const string REVIEW_URL = "itms-apps://itunes.apple.com/app/id" + APPLE_APP_ID + "?action=write-review";
#region android暂时没用到
// 国内包 bundle id
public const string BunldId_CN = "";
// 国内包 SDK 所需宏定义 - 【IOS_CN】请自行补全游戏中需要的其他宏
public const string ScriptingDefineSymbols_CN = ";";
// 海外包 bundle id
public const string BunldId_US = "";
// 海外包 SDK 所需宏定义 - 【】(请自行补全游戏中需要的其他宏)
public const string ScriptingDefineSymbols_US = "";
#endregion
}
#endif
#endif

View File

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 73d51ce101eef43039c02f142ae7ae8d
timeCreated: 1554361329
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,68 +0,0 @@
#if !TOUKA_TEST
#if UNITY_IOS
public static partial class StaticStringsKey {
#region SDK参数
#if IOS_CN
// apple app id
public const string APPLE_APP_ID = "1560492384"; // 只 review url(跳转游戏商店详情页) 有用到
// umeng
public const string UMENG_APPKEY = "60604423b8c8d45c13b371c6";
public const string UMENG_CHANNELID = "AppStore";
// ga
public const string GA_gameKey = "eb6b183378034413abeade812178e3e9";
public const string GA_secretKey = "3dec4785f7d53f4ddac931b7df7869e836333830";
// tenjin
public const string TENJIN_KEY = "PYOTVKJ4XZJHSMZW2V6GBQRCNXAFKWU2";
#else
// apple app id
public const string APPLE_APP_ID = "1579996579"; // 只 review url(跳转游戏商店详情页) 有用到
// umeng
public const string UMENG_APPKEY = "615004cd66b59330aa712a88";
public const string UMENG_CHANNELID = "AppStore";
// ga
public const string GA_gameKey = "9d36c99fe573dd705fe0036cc7920541";
public const string GA_secretKey = "b89ae3d2790eaefe47342eed512e822657c3585b";
// tenjin
public const string TENJIN_KEY = "PYOTVKJ4XZJHSMZW2V6GBQRCNXAFKWU2";
#endif
#endregion
#region
// 国内包 bundle id
public const string BunldId_CN = "com.toukagames.pitch";
// 国内包 SDK 所需宏定义 - 【IOS_CN】请自行补全游戏中需要的其他宏
public const string ScriptingDefineSymbols_CN = "IOS_CN;";
// 海外包 bundle id
public const string BunldId_US = "com.toukagames.pitch.global";
// 海外包 SDK 所需宏定义 - 【】(请自行补全游戏中需要的其他宏)
public const string ScriptingDefineSymbols_US = "";
#endregion
// review url
public const string REVIEW_URL = "itms-apps://itunes.apple.com/app/id" + APPLE_APP_ID + "?action=write-review";
}
#endif
#endif

View File

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: a9a981e32c9734136985386c9a5ffdeb
timeCreated: 1554361302
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,16 +0,0 @@
#if USE_IAP
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Purchasing;
public static class IAPProducts//商品ID统一小写
{
public const string NoAds = "com.hotpotgames.lovepuzzle.global.noads";//去广告商品ID
public static readonly Dictionary<string, ProductType> ProductDic = new Dictionary<string, ProductType>()
{
{ NoAds, ProductType.NonConsumable}
};
}
#endif

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 273966118b1974c51a4f05ecbad30d15
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,94 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class StaticOtherConfig
{
#region
/*
NO_SDK : sdk相关库文件也不会引起报错
NORMAL_BANNER : banner
NATIVE_BANNER : native拼banner
*/
#endregion
/// <summary>
/// 是否打印debug日志
/// </summary>
public static bool IsDebugLog = true;
#region Review Auto Popout
public static int FirstLoginPopLevel = 1;//Entering the game for the first time, the evaluation pops up at the Nth level
public static int OtherLoginPopLevel = 1;//not the first time to enter the game, the M level pops up the evaluation level
#endregion
#region
/// <summary>
/// 本地推送功能开关
/// </summary>
public const bool LocalNotitcifaction_Switch = true;
/// <summary>
/// 推送内容
/// 明天/第3、5、7天/第4、6、8天从三句话中随机出来一句
/// 中文、英文
/// </summary>
public const string MorrowMsgCN = "上一次的关卡还没通过,不来试试吗?|||最新的关卡已经更新,手快有手慢无,赶紧来试试!|||有一只小鸡仔在等你,速来!";
public const string Day357MsgCN = "拜托!尖叫吧小鸡仔真的好玩|||高智商玩家的选择能过20关的都不是一般人|||今日游戏已开启!为了自己而战!";
public const string Day468MsgCN = "游戏时间到了,赶快玩一把!|||敢来测测你的游戏水平吗?|||这一关隔壁老王都过了,你还没过?";
public const string MorrowMsgEN = "I keep getting beat by enemies. COME HELP!!|||Come and expand your territory|||I can't win this game without your help";
public const string Day357MsgEN = "For our homeland, you must defeat the enemy|||New challenge has been unlocked.|||You are a true warrior who defeated the enemy";
public const string Day468MsgEN = "Help me repel the enemy, only you can do it|||There are too many enemies, what should I do?|||New reward is ready, go online to claim it!";
/// <summary>
/// 推送时间
///
/// HourNum = 19 MinuteNum = 10 即 1910推送通知
/// </summary>
///
// 正常次日同时间点触发推送
// 可配置 如果晚上10点到早上6点登录时次日推送时间默认为晚上22点
public const int MorrowHourNum = 22;
public const int MorrowMinuteNum = 0;
// 第3、5、7天推送时间小时:分钟
public const int Day357HourNum = 19;
public const int Day357MinuteNum = 24;
// 第4、6、8天推送时间小时:分钟
public const int Day468HourNum = 20;
public const int Day468MinuteNum = 24;
#endregion
#region Tenjin
/// <summary>
/// 是否延迟初始化Tenjin开关
///
/// 只对CN版本有效
/// 正常为False
/// </summary>
public const bool InitTenjinLater_Switch = true;
#endregion
#region
/// <summary>
/// 排行榜功能开关
/// </summary>
public const bool LeaderBoard_Switch = false;
/// <summary>
/// 排行榜ID Appstore后台创建的
/// </summary>
public const string LeaderBoardId = "BossFightScore";
#endregion
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 7109073540d94454b818a71ae1cb02c6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More