@cc-component/cc-ex-component 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/core/ReferenceComponent.ts +24 -17
- package/assets/core/ViewModel.ts +50 -6
- package/package.json +1 -1
- package/assets/platform/Interface.ts +0 -80
- package/assets/platform/Interface.ts.meta +0 -9
- package/assets/platform/android/AndroidModule.ts +0 -12
- package/assets/platform/android/AndroidModule.ts.meta +0 -9
- package/assets/platform/android/AndroidSDK.ts +0 -186
- package/assets/platform/android/AndroidSDK.ts.meta +0 -1
- package/assets/platform/android/AnyThinkAds/ATBanner.ts +0 -266
- package/assets/platform/android/AnyThinkAds/ATBanner.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/ATInterstitial.ts +0 -185
- package/assets/platform/android/AnyThinkAds/ATInterstitial.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/ATInterstitialAuto.ts +0 -180
- package/assets/platform/android/AnyThinkAds/ATInterstitialAuto.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/ATNative.ts +0 -256
- package/assets/platform/android/AnyThinkAds/ATNative.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/ATRewardedAutoVideo.ts +0 -175
- package/assets/platform/android/AnyThinkAds/ATRewardedAutoVideo.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/ATRewardedVideo.ts +0 -243
- package/assets/platform/android/AnyThinkAds/ATRewardedVideo.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/ATSDK.ts +0 -222
- package/assets/platform/android/AnyThinkAds/ATSDK.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/ATSplash.ts +0 -155
- package/assets/platform/android/AnyThinkAds/ATSplash.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidBannerTS.ts +0 -71
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidBannerTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidInterstitialAutoTS.ts +0 -52
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidInterstitialAutoTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidInterstitialTS.ts +0 -41
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidInterstitialTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidNativeTS.ts +0 -47
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidNativeTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidRewardedVideoAutoTS.ts +0 -52
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidRewardedVideoAutoTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidRewardedVideoTS.ts +0 -41
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidRewardedVideoTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidSplashTS.ts +0 -42
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidSplashTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidTS.ts +0 -73
- package/assets/platform/android/AnyThinkAds/Android/ATAndroidTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/Android.meta +0 -9
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSBannerTS.ts +0 -66
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSBannerTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSInterstitiaAutolTS.ts +0 -54
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSInterstitiaAutolTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSInterstitialTS.ts +0 -43
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSInterstitialTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSNativeTS.ts +0 -47
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSNativeTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSRewardedAutoVideoTS.ts +0 -55
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSRewardedAutoVideoTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSRewardedVideoTS.ts +0 -43
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSRewardedVideoTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSSplashTS.ts +0 -47
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSSplashTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSTS.ts +0 -76
- package/assets/platform/android/AnyThinkAds/iOS/ATiOSTS.ts.meta +0 -9
- package/assets/platform/android/AnyThinkAds/iOS.meta +0 -9
- package/assets/platform/android/AnyThinkAds.meta +0 -9
- package/assets/platform/android/iOSSDK.ts +0 -14
- package/assets/platform/android/iOSSDK.ts.meta +0 -1
- package/assets/platform/android.meta +0 -11
- package/assets/platform/base/EditorSDK.ts +0 -30
- package/assets/platform/base/EditorSDK.ts.meta +0 -1
- package/assets/platform/base/PlatfprmModule.ts +0 -152
- package/assets/platform/base/PlatfprmModule.ts.meta +0 -9
- package/assets/platform/base/SDKBase.ts +0 -59
- package/assets/platform/base/SDKBase.ts.meta +0 -9
- package/assets/platform/base/SDKEnum.ts +0 -127
- package/assets/platform/base/SDKEnum.ts.meta +0 -9
- package/assets/platform/base/TTSDK.ts +0 -366
- package/assets/platform/base/TTSDK.ts.meta +0 -9
- package/assets/platform/base/WXSDK.ts +0 -149
- package/assets/platform/base/WXSDK.ts.meta +0 -1
- package/assets/platform/base.meta +0 -9
- package/assets/platform/wx/MiniSDK.ts +0 -1039
- package/assets/platform/wx/MiniSDK.ts.meta +0 -9
- package/assets/platform/wx/lib.douyin.d.ts +0 -168
- package/assets/platform/wx/lib.douyin.d.ts.meta +0 -9
- package/assets/platform/wx/wxmini.d.ts +0 -2452
- package/assets/platform/wx/wxmini.d.ts.meta +0 -9
- package/assets/platform/wx.meta +0 -9
- package/assets/platform.meta +0 -9
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { native } from 'cc';
|
|
2
|
-
|
|
3
|
-
import {ATiOSTS} from "./ATiOSTS";
|
|
4
|
-
const OC_WRAPPER_CLASS = "ATInterstitialAdWrapper";
|
|
5
|
-
export const ATiOSInterstitialTS = {
|
|
6
|
-
loadInterstitial : function (placementId, extra) {
|
|
7
|
-
ATiOSTS.printJsLog("ATiOSInterstitialJS::loadInterstitial(" + placementId + ", " + extra + ")");
|
|
8
|
-
native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "loadInterstitialWithPlacementID:extra:", placementId, extra);
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
setAdListener : function (listener) {
|
|
12
|
-
ATiOSTS.printJsLog("ATiOSInterstitialJS::setAdListener(" + listener + ")");
|
|
13
|
-
native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "setDelegates:", listener);
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
hasAdReady : function (placementId) {
|
|
17
|
-
ATiOSTS.printJsLog("ATiOSInterstitialJS::hasAdReady(" + placementId + ")");
|
|
18
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "interstitialReadyForPlacementID:", placementId);
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
checkAdStatus : function (placementId) {
|
|
22
|
-
ATiOSTS.printJsLog("ATiOSInterstitialJS::checkAdStatus(" + placementId + ")");
|
|
23
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "checkAdStatus:", placementId);
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
showAd : function(placementId) {
|
|
27
|
-
ATiOSTS.printJsLog("ATiOSInterstitialJS::showAd(" + placementId + ")");
|
|
28
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showInterstitialWithPlacementID:scene:", placementId, null);
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
showAdInScenario : function(placementId, scenario) {
|
|
33
|
-
ATiOSTS.printJsLog("ATiOSInterstitialJS::showAd(" + placementId + ", " + scenario + ")");
|
|
34
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showInterstitialWithPlacementID:scene:", placementId, scenario);
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
entryAdScenario : function(placementId, scenario) {
|
|
38
|
-
ATiOSTS.printJsLog("ATiOSInterstitialJS::entryAdScenario(" + placementId + ", " + scenario + ")");
|
|
39
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "entryAdScenarioWithPlacementID:scene:", placementId, scenario);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { native } from 'cc';
|
|
2
|
-
|
|
3
|
-
import {ATiOSTS} from "./ATiOSTS";
|
|
4
|
-
const OC_WRAPPER_CLASS = "ATNativeAdWrapper";
|
|
5
|
-
|
|
6
|
-
export const ATiOSNativeTS = {
|
|
7
|
-
loadNative : function(placementId, settings) {
|
|
8
|
-
ATiOSTS.printJsLog("ATiOSBannerJS::loadNative(" + placementId + ", " + settings + ")");
|
|
9
|
-
native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "loadNativeWithPlacementID:extra:", placementId, settings);
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setAdListener : function (listener) {
|
|
13
|
-
ATiOSTS.printJsLog("ATiOSNativeJS::setAdListener(" + listener + ")");
|
|
14
|
-
native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "setDelegates:", listener);
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
hasAdReady : function(placementId) {
|
|
18
|
-
ATiOSTS.printJsLog("ATiOSNativeJS::hasAdReady(" + placementId + ")");
|
|
19
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "nativeReadyForPlacementID:", placementId);
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
checkAdStatus : function(placementId) {
|
|
23
|
-
ATiOSTS.printJsLog("ATiOSNativeJS::checkAdStatus(" + placementId + ")");
|
|
24
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "nativeCheckAdStatusForPlacementID:", placementId);
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
showAd : function(placementId, adViewProperty) {
|
|
28
|
-
ATiOSTS.printJsLog("ATiOSNativeJS::showAd(" + placementId + ", " + adViewProperty + ")");
|
|
29
|
-
native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showNativeWithPlacementID:scene:metrics:", placementId, null, adViewProperty);
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
showAdInScenario : function(placementId, adViewProperty, scenario) {
|
|
33
|
-
ATiOSTS.printJsLog("ATiOSNativeJS::showAdInScenario(" + placementId + ", " + adViewProperty + ", " + scenario + ")");
|
|
34
|
-
native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showNativeWithPlacementID:scene:metrics:", placementId, scenario, adViewProperty);
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
removeAd : function(placementId) {
|
|
38
|
-
ATiOSTS.printJsLog("ATiOSNativeJS::removeAd(" + placementId + ")");
|
|
39
|
-
native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "removeNativeWithPlacementID:", placementId);
|
|
40
|
-
},
|
|
41
|
-
entryAdScenario : function(placementId, scenario) {
|
|
42
|
-
ATiOSTS.printJsLog("ATiOSInterstitialJS::entryAdScenario(" + placementId + ", " + scenario + ")");
|
|
43
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "entryAdScenarioWithPlacementID:scene:", placementId, scenario);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { native } from 'cc';
|
|
2
|
-
|
|
3
|
-
import {ATiOSTS} from "./ATiOSTS";
|
|
4
|
-
const OC_RV_WRAPPER_CLASS = "ATRewardedVideoAutoAdWrapper";
|
|
5
|
-
|
|
6
|
-
export const ATiOSRewardedVideoAutoAdJS = {
|
|
7
|
-
|
|
8
|
-
setAdListener : function (listener) {
|
|
9
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoAutoAdJS::setAdListener(" + listener + ")");
|
|
10
|
-
native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "setDelegates:", listener);
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
setAdExtraData : function (placementId, extra) {
|
|
14
|
-
|
|
15
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoAutoAdJS::setAdExtraData(" + placementId + ", " + extra + ")");
|
|
16
|
-
native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "setAutoLocalExtra:customDataJSONString:", placementId, extra);
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
addPlacementIds : function (placementId) {
|
|
20
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoAutoAdJS::addPlacementIds(" + placementId + ")");
|
|
21
|
-
native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "addAutoLoadAdPlacementID:", placementId);
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
removePlacementId : function (placementId) {
|
|
25
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoAutoAdJS::removePlacementId(" + placementId + ")");
|
|
26
|
-
native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "removeAutoLoadAdPlacementID:", placementId);
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
hasAdReady : function (placementId) {
|
|
30
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoAutoAdJS::hasAdReady(" + placementId + ")");
|
|
31
|
-
return native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "autoLoadRewardedVideoReadyForPlacementID:", placementId);
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
checkAdStatus : function (placementId) {
|
|
35
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoAutoAdJS::hasAdReady(" + placementId + ")");
|
|
36
|
-
return native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "checkAutoAdStatus:", placementId);
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
entryAdScenario : function(placementId, scenario) {
|
|
40
|
-
ATiOSTS.printJsLog("ATiOSInterstitialAutoAdJS::entryAdScenario(" + placementId + ", " + scenario + ")");
|
|
41
|
-
native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "entryAutoAdScenarioWithPlacementID:scenarioID:", placementId, scenario);
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
showAd : function(placementId) {
|
|
45
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoAutoAdJS::showAd(" + placementId + ")");
|
|
46
|
-
native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "showAutoRewardedVideoWithPlacementID:scenarioID:", placementId, null);
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
showAdInScenario : function(placementId, scenario) {
|
|
50
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoAutoAdJS::showAdInScenario(" + placementId + ", " + scenario + ")");
|
|
51
|
-
native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "showAutoRewardedVideoWithPlacementID:scenarioID:", placementId, scenario);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { native } from 'cc';
|
|
2
|
-
import {ATiOSTS} from "./ATiOSTS";
|
|
3
|
-
|
|
4
|
-
const OC_RV_WRAPPER_CLASS = "ATRewardedVideoWrapper";
|
|
5
|
-
export const ATiOSRewardedVideoTS = {
|
|
6
|
-
loadRewardedVideo : function (placementId, extra) {
|
|
7
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoJS::loadRewardedVideo(" + placementId + ", " + extra + ")");
|
|
8
|
-
native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "loadRewardedVideoWithPlacementID:extra:", placementId, extra);
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
setAdListener : function (listener) {
|
|
12
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoJS::setAdListener(" + listener + ")");
|
|
13
|
-
native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "setDelegates:", listener);
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
hasAdReady : function (placementId) {
|
|
17
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoJS::hasAdReady(" + placementId + ")");
|
|
18
|
-
return native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "rewardedVideoReadyForPlacementID:", placementId);
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
checkAdStatus : function (placementId) {
|
|
22
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoJS::checkAdStatus(" + placementId + ")");
|
|
23
|
-
return native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "checkAdStatus:", placementId);
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
showAd : function(placementId) {
|
|
27
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoJS::showAd(" + placementId + ")");
|
|
28
|
-
return native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "showRewardedVideoWithPlacementID:scene:", placementId, null);
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
showAdInScenario : function(placementId, scenario) {
|
|
33
|
-
ATiOSTS.printJsLog("ATiOSRewardedVideoJS::showAdInScenario(" + placementId + ", " + scenario + ")");
|
|
34
|
-
return native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "showRewardedVideoWithPlacementID:scene:", placementId, scenario);
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
entryAdScenario : function(placementId, scenario) {
|
|
38
|
-
ATiOSTS.printJsLog("ATiOSInterstitialJS::entryAdScenario(" + placementId + ", " + scenario + ")");
|
|
39
|
-
return native.reflection.callStaticMethod(OC_RV_WRAPPER_CLASS, "entryAdScenarioWithPlacementID:scene:", placementId, scenario);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {ATiOSTS} from "./ATiOSTS";
|
|
2
|
-
import { native } from 'cc';
|
|
3
|
-
|
|
4
|
-
const OC_WRAPPER_CLASS = "ATSplashAdWrapper";
|
|
5
|
-
|
|
6
|
-
export const ATiOSSplashTS = {
|
|
7
|
-
loadSplash : function (placementId, extra) {
|
|
8
|
-
ATiOSTS.printJsLog("ATiOSSplashJS::loadSplash(" + placementId + ", " + extra + ")");
|
|
9
|
-
native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "loadSplashWithPlacementID:extra:", placementId, extra);
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
setAdListener : function (listener) {
|
|
13
|
-
ATiOSTS.printJsLog("ATiOSSplashJS::setAdListener(" + listener + ")");
|
|
14
|
-
native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "setDelegates:", listener);
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
hasAdReady : function (placementId) {
|
|
18
|
-
ATiOSTS.printJsLog("ATiOSSplashJS::hasAdReady(" + placementId + ")");
|
|
19
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "splashReadyForPlacementID:", placementId);
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
checkAdStatus : function (placementId) {
|
|
23
|
-
ATiOSTS.printJsLog("ATiOSSplashJS::checkAdStatus(" + placementId + ")");
|
|
24
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "checkAdStatus:", placementId);
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
showAd : function(placementId) {
|
|
28
|
-
ATiOSTS.printJsLog("ATiOSSplashJS::showAd(" + placementId + ")");
|
|
29
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showSplashWithPlacementID:scene:", placementId, null);
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
showAdWithExtra : function(placementId, showExtra) {
|
|
33
|
-
ATiOSTS.printJsLog("ATiOSSplashJS::showAd(" + placementId + " , " + showExtra + ")");
|
|
34
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showSplashWithPlacementID:showExtra:", placementId, showExtra);
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
showAdInScenario : function(placementId, scenario) {
|
|
38
|
-
ATiOSTS.printJsLog("ATiOSSplashJS::showAd(" + placementId + ", " + scenario + ")");
|
|
39
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "showSplashWithPlacementID:scene:", placementId, scenario);
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
entryAdScenario : function(placementId, scenario) {
|
|
43
|
-
ATiOSTS.printJsLog("ATiOSSplashJS::entryAdScenario(" + placementId + ", " + scenario + ")");
|
|
44
|
-
return native.reflection.callStaticMethod(OC_WRAPPER_CLASS, "entryAdScenarioWithPlacementID:scene:", placementId, scenario);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { native } from 'cc';
|
|
2
|
-
|
|
3
|
-
const OC_ATSDK_MANAGER_CLASS = "ATSDKManager";
|
|
4
|
-
const OC_BIRDGE_CLASS = "ATJSBridge";
|
|
5
|
-
|
|
6
|
-
export const ATiOSTS = {
|
|
7
|
-
initSDK : function(appid, appkey) {
|
|
8
|
-
this.printJsLog("ATiOSJS::initSDK(" + appid + "," + appkey + ")");
|
|
9
|
-
native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "startWithAppID:appKey:", appid, appkey);
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
initCustomMap : function(customMap) {
|
|
13
|
-
this.printJsLog("ATiOSJS::initCustomMap(" + customMap + ")");
|
|
14
|
-
native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setCustomData:", customMap);
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
setPlacementCustomMap : function(placmentId, customMap) {
|
|
18
|
-
this.printJsLog("ATiOSJS::setPlacementCustomMap(" + placmentId + ", " + customMap + ")");
|
|
19
|
-
native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setCustomData:forPlacementID:", customMap, placmentId);
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
setGDPRLevel : function(level) {
|
|
23
|
-
this.printJsLog("ATiOSJS::setGDPRLevel(" + level + ")");
|
|
24
|
-
native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setDataConsent:", level);
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
getGDPRLevel : function() {
|
|
28
|
-
this.printJsLog("ATiOSJS::getGDPRLevel()");
|
|
29
|
-
return native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "dataConsent", "()I");
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
getUserLocation : function(callbackMethod) {
|
|
33
|
-
this.printJsLog("ATiOSJS::getUserLocation(" + callbackMethod + ")");
|
|
34
|
-
native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "getUserLocationWithCallback:", callbackMethod);
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
showGDPRAuth : function () {
|
|
38
|
-
this.printJsLog("ATiOSJS::showGDPRAuth()");
|
|
39
|
-
native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "presentDataConsentDialog", "()I");
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
setLogDebug : function (debug) {
|
|
43
|
-
this.printJsLog("ATiOSJS::setLogDebug(" + debug + ")");
|
|
44
|
-
native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "setDebugLog:", debug);
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
printJsLog : function(msg) {
|
|
48
|
-
console.log(msg);
|
|
49
|
-
if (undefined != msg && msg != null) {
|
|
50
|
-
native.reflection.callStaticMethod(OC_BIRDGE_CLASS, "log:", msg);
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
deniedUploadDeviceInfo : function (deniedInfo) {
|
|
55
|
-
this.printJsLog("ATiOSJS::deniedUploadDeviceInfo(" + deniedInfo + ")");
|
|
56
|
-
native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "deniedUploadDeviceInfo:", deniedInfo);
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
showGDPRConsent : function(callbackMethod) {
|
|
60
|
-
// native.reflection.callStaticMethod(classJavaName, "showGDPRConsentDialog", "(Ljava/lang/String;)V", callbackMethod);
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
showDebuggerUI : function (debugKey) {
|
|
64
|
-
native.reflection.callStaticMethod(OC_ATSDK_MANAGER_CLASS, "showDebuggerUIWithDebugKey:", debugKey);
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
setChannel : function(channel: any) {
|
|
68
|
-
// native.reflection.callStaticMethod(classJavaName, "setChannel", "(I)V", channel);
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
setSubChannel : function(subChannel: any) {
|
|
72
|
-
// native.reflection.callStaticMethod(classJavaName, "setSubChannel", "(I)V", subChannel);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
};
|
|
76
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"253f9d17-1d13-48e8-a6be-cfc885a8c8bb","files":[],"subMetas":{},"userData":{}}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { _decorator, Component, Node } from 'cc';
|
|
2
|
-
import { SDKBase } from './SDKBase';
|
|
3
|
-
import { AdsCall, AdsData, PositonData, SDKLoginData, SDKStatus } from './SDKEnum';
|
|
4
|
-
const { ccclass, property } = _decorator;
|
|
5
|
-
|
|
6
|
-
@ccclass('EditorSDK')
|
|
7
|
-
export class EditorSDK extends SDKBase {
|
|
8
|
-
init(): Promise<boolean> {
|
|
9
|
-
return Promise.resolve(true);
|
|
10
|
-
}
|
|
11
|
-
public login(data?: string): Promise<SDKLoginData> {
|
|
12
|
-
return Promise.resolve({ success: true, code: '200' });
|
|
13
|
-
}
|
|
14
|
-
public logout(): Promise<SDKStatus> {
|
|
15
|
-
return Promise.resolve(SDKStatus.success);
|
|
16
|
-
}
|
|
17
|
-
public initRewardedVideo(param: AdsData) {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
public showRewardedVideo(param: AdsCall) {
|
|
21
|
-
param.success?.();
|
|
22
|
-
}
|
|
23
|
-
public toPosition(node: Node): PositonData {
|
|
24
|
-
return { x: 0, y: 0, width: 0, height: 0 };
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"0f00eac4-b793-400b-afa6-0c096e820182","files":[],"subMetas":{},"userData":{}}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { sys, Node } from "cc";
|
|
2
|
-
import { TTSDK } from "./TTSDK";
|
|
3
|
-
import { SDKBase } from "./SDKBase";
|
|
4
|
-
import { EditorSDK } from "./EditorSDK";
|
|
5
|
-
import { WXSDK } from "./WXSDK";
|
|
6
|
-
import { AdsCall, AdsData, ButtonTouch, SDKBuyParam, SDKStatus, TTBaseData, TTData, UserInfoData } from "./SDKEnum";
|
|
7
|
-
import { ICreateUserInfoButton } from "../wx/MiniSDK";
|
|
8
|
-
import { UITransform } from "cc";
|
|
9
|
-
import { assetManager } from "cc";
|
|
10
|
-
|
|
11
|
-
export class PlatfprmModule {
|
|
12
|
-
static _instance: PlatfprmModule = null;
|
|
13
|
-
static get instance(): PlatfprmModule {
|
|
14
|
-
if (!this._instance) {
|
|
15
|
-
this._instance = new PlatfprmModule();
|
|
16
|
-
}
|
|
17
|
-
return this._instance;
|
|
18
|
-
}
|
|
19
|
-
private sdk: SDKBase;
|
|
20
|
-
|
|
21
|
-
static buttonTouch: ButtonTouch = {
|
|
22
|
-
tt_button: false,
|
|
23
|
-
tt_button_subscribe: "",
|
|
24
|
-
tt_button_feedsubscribe: false,
|
|
25
|
-
wx_button_subscribe: false
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
static async Init(): Promise<boolean> {
|
|
29
|
-
console.error("Init")
|
|
30
|
-
switch (sys.platform) {
|
|
31
|
-
case sys.Platform.BYTEDANCE_MINI_GAME:
|
|
32
|
-
PlatfprmModule.instance.sdk = new TTSDK();
|
|
33
|
-
break;
|
|
34
|
-
case sys.Platform.WECHAT_GAME:
|
|
35
|
-
case sys.Platform.WECHAT_MINI_PROGRAM:
|
|
36
|
-
PlatfprmModule.instance.sdk = new WXSDK();
|
|
37
|
-
break;
|
|
38
|
-
case sys.Platform.ANDROID:
|
|
39
|
-
await PlatfprmModule.LoadBundle("android");
|
|
40
|
-
PlatfprmModule.instance.sdk = AndroidModule.Init();
|
|
41
|
-
break;
|
|
42
|
-
default:
|
|
43
|
-
PlatfprmModule.instance.sdk = new EditorSDK();
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
return PlatfprmModule.instance.sdk.init();
|
|
47
|
-
}
|
|
48
|
-
static LoadBundle(name: string): Promise<any> {
|
|
49
|
-
return new Promise<any>((resolve, reject) => {
|
|
50
|
-
assetManager.loadBundle(name, (error, bundle) => {
|
|
51
|
-
if (error) {
|
|
52
|
-
console.error('加载bundle android 失败', error)
|
|
53
|
-
resolve(null)
|
|
54
|
-
} else {
|
|
55
|
-
console.log('加载bundle android 成功')
|
|
56
|
-
resolve(bundle)
|
|
57
|
-
}
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
static Login(param?: any) {
|
|
63
|
-
return PlatfprmModule.instance.sdk.login(param);
|
|
64
|
-
}
|
|
65
|
-
static Logout(): Promise<SDKStatus> {
|
|
66
|
-
return PlatfprmModule.instance.sdk.logout();
|
|
67
|
-
}
|
|
68
|
-
/**支付--目前只有安卓接入了 */
|
|
69
|
-
static Pay(param: SDKBuyParam): Promise<SDKStatus> {
|
|
70
|
-
return PlatfprmModule.instance.sdk.pay?.(param);
|
|
71
|
-
}
|
|
72
|
-
static NavigateToScene(param?: { scene?: string, callBack?: () => void }) {
|
|
73
|
-
PlatfprmModule.instance.sdk.navigateToScene?.(param);//sidebar
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
static RequestFeedSubscribe(call: (success: boolean) => void) {
|
|
77
|
-
PlatfprmModule.instance.sdk.requestFeedSubscribe = call;
|
|
78
|
-
}
|
|
79
|
-
static ReportScene() {
|
|
80
|
-
PlatfprmModule.instance.sdk.reportScene?.();
|
|
81
|
-
}
|
|
82
|
-
static ReportFeed(data: TTBaseData) {
|
|
83
|
-
PlatfprmModule.instance.sdk.reportFeed?.(data.contentID, data.scene);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
static StoreFeedData(data: TTData) {
|
|
87
|
-
PlatfprmModule.instance.sdk.storeFeedData?.(data);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
static GetFeedData(contentID: string, scene: number): Promise<boolean> {
|
|
91
|
-
return PlatfprmModule.instance.sdk.getFeedData?.(contentID, scene) ?? Promise.resolve(false);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
static CheckFeedSubscribeStatus(): Promise<boolean> {
|
|
95
|
-
return PlatfprmModule.instance.sdk.checkFeedSubscribeStatus?.();
|
|
96
|
-
}
|
|
97
|
-
static CheckScene(): Promise<boolean> {
|
|
98
|
-
return PlatfprmModule.instance.sdk.checkScene?.();
|
|
99
|
-
}
|
|
100
|
-
static AddShortcut() {
|
|
101
|
-
return PlatfprmModule.instance.sdk.addShortcut?.();
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
static ToPosition(node: Node) {
|
|
105
|
-
return PlatfprmModule.instance.sdk.toPosition?.(node);
|
|
106
|
-
}
|
|
107
|
-
static CreateGameClubButton(node: Node) {
|
|
108
|
-
return PlatfprmModule.instance.sdk.createGameClubButton?.(node) ?? null
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
static CreateUserInfoButton(param: ICreateUserInfoButton, callBack: (userInfo: UserInfoData) => void) {
|
|
112
|
-
return PlatfprmModule.instance.sdk.createUserInfoButton?.(param, callBack) ?? null;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
//开放数据域
|
|
116
|
-
static InitOpenDataLayout(node: Node) {
|
|
117
|
-
const tr = node.getComponent(UITransform);
|
|
118
|
-
const params = { x: 0, y: 0, width: tr.width, height: tr.height }
|
|
119
|
-
PlatfprmModule.instance.sdk.initOpenDataLayout?.(params);
|
|
120
|
-
}
|
|
121
|
-
static SendMessageToOpenData(params: { type: string, event: string }) {
|
|
122
|
-
PlatfprmModule.instance.sdk.sendMessageToOpenData?.(params);
|
|
123
|
-
}
|
|
124
|
-
/** 更新微信开放数据榜单数据 */
|
|
125
|
-
static UpdateCloudRank(key: string, score: number): Promise<boolean> {
|
|
126
|
-
return PlatfprmModule.instance.sdk.updateCloudRank?.(key, score);
|
|
127
|
-
}
|
|
128
|
-
static ShowRank(keyList: string[], openId?: string) {
|
|
129
|
-
return PlatfprmModule.instance.sdk.showRank?.(keyList, openId);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**检查是否显示隐私条约 */
|
|
133
|
-
static CheckShowPrivacy(): Promise<boolean> {
|
|
134
|
-
return PlatfprmModule.instance.sdk.checkShowPrivacy?.();
|
|
135
|
-
}
|
|
136
|
-
static OpenPrivacyCUrl(): void {
|
|
137
|
-
PlatfprmModule.instance.sdk.openPrivacyCUrl?.();
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**激励视频初始化 */
|
|
141
|
-
static InitRewardedVideo(param: AdsData) {
|
|
142
|
-
return PlatfprmModule.instance.sdk.initRewardedVideo?.(param);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**激励视频显示 */
|
|
146
|
-
static ShowRewardedVideo(param: AdsCall) {
|
|
147
|
-
PlatfprmModule.instance.sdk.showRewardedVideo?.(param);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
//@ts-ignore
|
|
151
|
-
window.PlatfprmModule = PlatfprmModule;
|
|
152
|
-
|