This commit is contained in:
2025-07-17 17:18:21 +08:00
commit 1ffc1b5cf0
5309 changed files with 1150310 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 KiB

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "d3a5c2eb-c5f3-4f74-8034-f3d0b9d86925",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "d3a5c2eb-c5f3-4f74-8034-f3d0b9d86925@6c48a",
"displayName": "tiannin_stage_bg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "d3a5c2eb-c5f3-4f74-8034-f3d0b9d86925",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "d3a5c2eb-c5f3-4f74-8034-f3d0b9d86925@f9941",
"displayName": "tiannin_stage_bg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 996,
"height": 1280,
"rawWidth": 996,
"rawHeight": 1280,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-498,
-640,
0,
498,
-640,
0,
-498,
640,
0,
498,
640,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1280,
996,
1280,
0,
0,
996,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-498,
-640,
0
],
"maxPos": [
498,
640,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "d3a5c2eb-c5f3-4f74-8034-f3d0b9d86925@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "d3a5c2eb-c5f3-4f74-8034-f3d0b9d86925@6c48a"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "cff73a8c-cba1-4169-81fb-3291da1446af",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "cff73a8c-cba1-4169-81fb-3291da1446af@6c48a",
"displayName": "lulala_avatar",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "cff73a8c-cba1-4169-81fb-3291da1446af",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "cff73a8c-cba1-4169-81fb-3291da1446af@f9941",
"displayName": "lulala_avatar",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 300,
"height": 300,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-150,
-150,
0,
150,
-150,
0,
-150,
150,
0,
150,
150,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
300,
300,
300,
0,
0,
300,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-150,
-150,
0
],
"maxPos": [
150,
150,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "cff73a8c-cba1-4169-81fb-3291da1446af@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "cff73a8c-cba1-4169-81fb-3291da1446af@6c48a"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "98af1e74-00e6-4097-8316-75e10b4e4b52",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "98af1e74-00e6-4097-8316-75e10b4e4b52@6c48a",
"displayName": "lingyun_3_cg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "98af1e74-00e6-4097-8316-75e10b4e4b52",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "98af1e74-00e6-4097-8316-75e10b4e4b52@f9941",
"displayName": "lingyun_3_cg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 996,
"height": 1280,
"rawWidth": 996,
"rawHeight": 1280,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-498,
-640,
0,
498,
-640,
0,
-498,
640,
0,
498,
640,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1280,
996,
1280,
0,
0,
996,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-498,
-640,
0
],
"maxPos": [
498,
640,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "98af1e74-00e6-4097-8316-75e10b4e4b52@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "98af1e74-00e6-4097-8316-75e10b4e4b52@6c48a"
}
}
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "34ff90b1-b8fe-44ed-bfb3-7b2b9ef67669",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "34ff90b1-b8fe-44ed-bfb3-7b2b9ef67669@6c48a",
"displayName": "hippo_stage_bg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "34ff90b1-b8fe-44ed-bfb3-7b2b9ef67669",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "34ff90b1-b8fe-44ed-bfb3-7b2b9ef67669@f9941",
"displayName": "hippo_stage_bg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 996,
"height": 1280,
"rawWidth": 996,
"rawHeight": 1280,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-498,
-640,
0,
498,
-640,
0,
-498,
640,
0,
498,
640,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1280,
996,
1280,
0,
0,
996,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-498,
-640,
0
],
"maxPos": [
498,
640,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "34ff90b1-b8fe-44ed-bfb3-7b2b9ef67669@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "34ff90b1-b8fe-44ed-bfb3-7b2b9ef67669@6c48a"
}
}
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "117cc6bf-2f86-45cc-a47c-f47f992f573a",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "117cc6bf-2f86-45cc-a47c-f47f992f573a@6c48a",
"displayName": "youmiaoxiang_laugh",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "117cc6bf-2f86-45cc-a47c-f47f992f573a",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "117cc6bf-2f86-45cc-a47c-f47f992f573a@f9941",
"displayName": "youmiaoxiang_laugh",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -4.5,
"offsetY": -33.5,
"trimX": 176,
"trimY": 67,
"width": 564,
"height": 1122,
"rawWidth": 925,
"rawHeight": 1189,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-282,
-561,
0,
282,
-561,
0,
-282,
561,
0,
282,
561,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
176,
1122,
740,
1122,
176,
0,
740,
0
],
"nuv": [
0.19027027027027027,
0,
0.8,
0,
0.19027027027027027,
0.943650126156434,
0.8,
0.943650126156434
],
"minPos": [
-282,
-561,
0
],
"maxPos": [
282,
561,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "117cc6bf-2f86-45cc-a47c-f47f992f573a@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "117cc6bf-2f86-45cc-a47c-f47f992f573a@6c48a"
}
}
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "a5dc1205-363f-42d5-8024-e8c942900c11",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "a5dc1205-363f-42d5-8024-e8c942900c11@6c48a",
"displayName": "ninian_0_cg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "a5dc1205-363f-42d5-8024-e8c942900c11",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "a5dc1205-363f-42d5-8024-e8c942900c11@f9941",
"displayName": "ninian_0_cg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 996,
"height": 1280,
"rawWidth": 996,
"rawHeight": 1280,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-498,
-640,
0,
498,
-640,
0,
-498,
640,
0,
498,
640,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1280,
996,
1280,
0,
0,
996,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-498,
-640,
0
],
"maxPos": [
498,
640,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "a5dc1205-363f-42d5-8024-e8c942900c11@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "a5dc1205-363f-42d5-8024-e8c942900c11@6c48a"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

@@ -0,0 +1,192 @@
import { _decorator, Color, Label, Node, Sprite, view } from 'cc';
import { GButton } from '../../Main/Common/GButton';
import Utils from '../../Main/Common/Utils';
import li_BaseView from '../../Main/Common/li_BaseView';
import HttpUnit from '../../Main/Common/HttpUnit';
import SubManager from '../SubManager';
import GameManager from '../../Main/Manager/GameManager';
const { ccclass, property } = _decorator;
/**广告、分享的用途类型 */
export enum E_AD_TARGET {
/**加相亲次数 */
xiangqin = 1,
/**加聊天次数 */
liaotian = 2,
/**对话评分+10 */
baoji = 3,
/**撤回上一轮对话 */
chehui = 4,
}
//关卡内看广告弹窗界面
@ccclass('TalkAdDialog')
export class TalkAdDialog extends li_BaseView {
private _nodeTab: any = {};
private _data;
//----重写父类接口---------------------------------------
onLoadCT() {
this.registerListenner();
Utils.parseNode(this.node, this._nodeTab)
}
openUIDataCT(data: any): void {
this._data = data || {};
}
registerListenner() {
// Utils.addInnerEL(InnerMsgCode.GM_UI_Close, this, this.resiveGMClose)
}
start() {
GButton.BandClick(this._nodeTab.mask, ()=>{
if (this._data.closeCallback) {
this._data.closeCallback();
}
this.onClose();
}, this, 0, null, null, false);
GButton.BandClick(this._nodeTab.btnClose, ()=>{
if (this._data.closeCallback) {
this._data.closeCallback();
}
this.onClose();
}, this);
GButton.BandClick(this._nodeTab.btnShare, ()=>{
if (this._data.type == E_AD_TARGET.liaotian) {
let levelData = GameManager.CurLevelData
if (levelData && levelData.share_num <= 0) {
SubManager.ShowPrompt("今日分享次数已用完");
return;
}
}
if (this._data.type == E_AD_TARGET.xiangqin && HttpUnit.GetXiangqinShareNum() <= 0) {
SubManager.ShowPrompt("今日分享次数已用完");
return;
}
if (this._data.shareCallback) {
this._data.shareCallback();
}
this.onClose();
}, this);
GButton.BandClick(this._nodeTab.btnAD, ()=>{
if (this._data.type == E_AD_TARGET.liaotian) {
let levelData = GameManager.CurLevelData
if (levelData && levelData.ad_num <= 0) {
SubManager.ShowPrompt("关卡内续航次数已用完");
return;
}
}
if (this._data.type == E_AD_TARGET.xiangqin && HttpUnit.GetXiangqinAdNum() <= 0) {
SubManager.ShowPrompt("今日广告次数已用完");
return;
}
if (this._data.type == E_AD_TARGET.baoji) {
let levelData = GameManager.CurLevelData
if (levelData) {
if (levelData.can_use_strength_cnt <= 0) {
SubManager.ShowPrompt("关卡内加分次数已用完");
return;
}
if (levelData.is_strength_take_effect == true) {
SubManager.ShowPrompt("“甜蜜暴击”效果已生效,效果不可叠加");
return;
}
}
}
if (this._data.type == E_AD_TARGET.chehui) {
let levelData = GameManager.CurLevelData
if (levelData && levelData.can_use_cancel_cnt <= 0) {
SubManager.ShowPrompt("关卡内撤回次数已用完");
return;
}
}
if (this._data.adCallback) {
this._data.adCallback();
}
this.onClose();
}, this);
Utils.setString(this._nodeTab.labContent, this._data.content);
//关卡内聊天不再显示分享按钮
if (this._data.type == E_AD_TARGET.liaotian || this._data.type == E_AD_TARGET.baoji || this._data.type == E_AD_TARGET.chehui) {
this._nodeTab.btnShare.active = false;
}
//次数用完后置灰按钮
this.refreshBtnState()
}
//刷新按钮状态
private refreshBtnState() {
//分享按钮
let shareGray = false
if (this._data.type == E_AD_TARGET.liaotian) {
let levelData = GameManager.CurLevelData
if (levelData && levelData.share_num <= 0) {
shareGray = true
}
} else if (this._data.type == E_AD_TARGET.xiangqin) {
if (HttpUnit.GetXiangqinShareNum() <= 0) {
shareGray = true
}
}
if (shareGray) {
let shareSpt: Sprite = this._nodeTab.btnShare.getComponent(Sprite);
shareSpt.grayscale = true;
shareSpt.color = new Color(173, 173, 173, 255);
}
//广告按钮
let adGray = false
if (this._data.type == E_AD_TARGET.liaotian) {
let levelData = GameManager.CurLevelData
if (levelData && levelData.ad_num <= 0) {
Utils.setNodeGray(this._nodeTab.btnAD, true);
adGray = true
}
} else if (this._data.type == E_AD_TARGET.xiangqin) {
if (HttpUnit.GetXiangqinAdNum() <= 0) {
Utils.setNodeGray(this._nodeTab.btnAD, true);
adGray = true
}
} else if (this._data.type == E_AD_TARGET.baoji) {
let levelData = GameManager.CurLevelData
if (levelData) {
if (levelData.can_use_strength_cnt <= 0 || levelData.is_strength_take_effect == true) {
adGray = true
}
}
} else if (this._data.type == E_AD_TARGET.chehui) {
let levelData = GameManager.CurLevelData
if (levelData && levelData.can_use_cancel_cnt <= 0) {
adGray = true
}
}
if (adGray) {
let adSpt: Sprite = this._nodeTab.btnAD.getComponent(Sprite);
adSpt.grayscale = true;
let adSpt1: Sprite = this._nodeTab.adSpt1.getComponent(Sprite);
adSpt1.color = new Color(255, 255, 255, 130);
let labYes: Label = this._nodeTab.labYes.getComponent(Label);
labYes.color = new Color(173, 173, 173, 255);
}
}
update(deltaTime: number) {
}
}
@@ -0,0 +1,274 @@
import { _decorator, Component, sys, utils } from "cc";
import Utils from "../Common/Utils";
import { WXSDK } from "./wxSDK";
import { ByteDanceSDK } from "./bdSDK";
import { WebSDK } from "./webSDK";
import { KSSDK } from "./ksSDK";
const { ccclass, property } = _decorator;
/**运行渠道 */
export enum E_SDK_Channel {
/**微信 */
WX,
/**字节跳动 (抖音、头条) */
BD,
/**网页 */
WEB,
/**快手 */
KS,
}
/**玩家SDK信息 */
export interface I_SDK_UserInfo {
/**昵称 */
nickName: string;
/**头像url */
avatarUrl: string;
}
/**玩家SDK信息回调 */
export interface I_SDK_UserInfo_Callback {
(info: I_SDK_UserInfo): void;
}
//渠道管理器
@ccclass('SDKManager')
export class SDKManager { //extends Component
private static _I: SDKManager = null;
public static get I(): SDKManager {
if (!SDKManager._I) {
SDKManager._I = new SDKManager();
SDKManager._I.init();
}
return SDKManager._I;
}
private init(){
}
initEmpty(){
}
//玩家头像
private static _avatarUrl: string = "";
public static get avatarUrl(): string {
return SDKManager._avatarUrl;
}
public static set avatarUrl(value: string) {
if (value == null) {
value = "";
}
SDKManager._avatarUrl = value;
}
//玩家昵称
private static _nickName: string = "";
public static get nickName(): string {
return SDKManager._nickName;
}
public static set nickName(value: string) {
if (value == null) {
value = "游客";
}
SDKManager._nickName = value;
}
private static sdk_channel:E_SDK_Channel = E_SDK_Channel.WEB //当前SDK渠道
private static video_reward_map:any
private static share_reward_map:any
private static sdk:any
//初始化SDK
static init(cb: Function = null) {
this.video_reward_map = {}
this.share_reward_map = {}
console.log("平台值 wx:",window["wx"], typeof window["wx"])
console.log("平台值 ks:",window["ks"], typeof window["ks"])
console.log("平台值 tt:",window["tt"], typeof window["tt"])
console.log("当前平台:",sys.platform)
if (typeof window["ks"] !== 'undefined') {
this.sdk_channel = E_SDK_Channel.KS
this.sdk = new KSSDK() //快手
}else if (sys.platform === sys.Platform.WECHAT_GAME && typeof window["wx"] !== 'undefined') {
this.sdk_channel = E_SDK_Channel.WX
this.sdk = new WXSDK() //微信
} else if (sys.platform === sys.Platform.BYTEDANCE_MINI_GAME && typeof window["tt"] !== 'undefined') {
this.sdk_channel = E_SDK_Channel.BD
this.sdk = new ByteDanceSDK() //抖音(头条)
} else {
this.sdk_channel = E_SDK_Channel.WEB
this.sdk = new WebSDK()
}
// if (sys.platform === sys.Platform.WECHAT_GAME) {
// this.sdk = new WXSDK()
// } else if (sys.platform === sys.Platform.BYTEDANCE_MINI_GAME) {
// this.sdk = new ByteDanceSDK()
// } else {
// this.sdk = new WebSDK()
// }
this.sdk.init(cb)
}
/**是否是微信平台 */
static isWenxin() {
return this.sdk_channel === E_SDK_Channel.WX
}
/**是否是抖音平台 */
static isByteDance() {
return this.sdk_channel === E_SDK_Channel.BD
}
/**是否是快手平台 */
static isKuaishou() {
return this.sdk_channel === E_SDK_Channel.KS
}
/**是否是web平台 */
static isWeb() {
return this.sdk_channel === E_SDK_Channel.WEB
}
//SDK登录,并返回code
static login(cb: Function = null) {
this.sdk.login(cb)
}
//检查玩家权限
//autoKey 授权类型 userInfo=用户信息
static checkAutoSetting(autoKey:string, cb:Function = null) {
this.sdk.checkAutoSetting(autoKey, cb)
}
//获取用户信息
static getUserInfo(cb:Function = null) {
this.sdk.getUserInfo(cb)
}
//注册视频广告回调
static register_video_reward(uuid:string, func:Function) {
let video_reward_map = this.video_reward_map || {};
video_reward_map[uuid] = func
this.video_reward_map = video_reward_map;
}
//注册分享回调
static register_share_reward(uuid:string, func:Function) {
let share_reward_map = this.share_reward_map || {};
share_reward_map[uuid] = func
this.share_reward_map = share_reward_map;
}
//执行视频广告回调
private static dispatch_video_reward(uuid:string, tag:number) {
let video_reward_map = this.video_reward_map || {};
let register_func:Function = video_reward_map[uuid];
if (register_func) {
register_func(tag)
}
}
//执行分享回调
private static dispatch_share_reward(uuid:string, tag:number) {
let share_reward_map = this.share_reward_map || {};
let register_func:Function = share_reward_map[uuid];
if (register_func) {
register_func(tag)
}
}
//视频广告
static show_reward_video_ad(uuid:string, tag: number) {
this.sdk.show_video(()=>{
this.dispatch_video_reward(uuid,tag)
});
}
//插屏广告
static show_interstitial_ad() {
this.sdk.show_splash();
}
//展示BANNER
static show_banner_ad() {
this.sdk.show_banner();
}
//隐藏BANNBER
static hide_banner_ad() {
this.sdk.hide_banner();
}
//主动拉起分享
static show_share() {
this.sdk.show_share();
}
//分享得奖励
static show_reward_share(uuid:string, tag: number) {
this.sdk.show_share(()=>{
this.dispatch_share_reward(uuid,tag)
});
}
//获取设备分辨率
static getWindowSize() {
return this.sdk.getWindowSize();
}
/**显示游戏圈
* @param leftRatio 左边距占屏幕宽度的比例
* @param topRatio 顶部边距占屏幕高度的比例
* @param widthRatio 游戏圈宽度占屏幕宽度的比例
* @param heightRatio 游戏圈高度占屏幕高度的比例
*/
static show_gameClub(leftRatio, topRatio, widthRatio, heightRatio) {
this.sdk.show_gameClub(leftRatio, topRatio, widthRatio, heightRatio);
}
//隐藏游戏圈
static hide_gameClub() {
this.sdk.hide_gameClub();
}
/**检查是否支持base64音频播放*/
static checkSupportBase64Audio() {
return this.sdk.checkSupportBase64Audio();
}
/**播放base64音频 */
static playBase64Audio(base64: string, loop: boolean = false) {
this.sdk.playBase64Audio(base64, loop);
}
//记录GM日志
private static _gmLogString: string = "";
private static _gmLogCount: number = 0; //记录日志条数
static get GMLogString(): string {
return SDKManager._gmLogString;
}
static ShowGMLog(log: string){
Utils.Log(log);
if (SDKManager._gmLogCount > 100){
SDKManager.ClearGMLog();
}
SDKManager._gmLogString += log + "\n";
SDKManager._gmLogCount++;
}
static ClearGMLog(){
SDKManager._gmLogString = "";
SDKManager._gmLogCount = 0;
}
/**是否是微信小程序 */
static get isWeChatGame(): boolean {
Utils.Log(`platform = ${sys.platform}`);
return sys.platform == sys.Platform.WECHAT_GAME;
}
}
@@ -0,0 +1,233 @@
{
"gizmos-infos": {
"is2D": true,
"is3DIcon": false,
"iconSize": 2,
"gridVisible": true,
"gridColor": [
166,
166,
166,
255
],
"transformToolName": "position",
"pivot": "pivot",
"coordinate": "local",
"toolsVisibility3d": true
},
"__version__": "1.0.1",
"builder": {
"taskOptionsMap": {},
"__version__": "1.3.8"
},
"snap-configs": {
"position": {
"x": 1,
"y": 1,
"z": 1
},
"rotation": 1,
"scale": 1,
"isPositionSnapEnabled": false,
"isRotationSnapEnabled": false,
"isScaleSnapEnabled": false
},
"rect-snap-configs": {
"enableSnapping": true,
"snapThreshold": 4
},
"float-window": {
"position": {
"cc": {
"Camera": {
"dock": false,
"top": null,
"bottom": 10,
"left": null,
"right": 10
}
}
}
},
"camera-infos": {
"1fcc05e5-18d9-4302-b271-815963b8fb27": {
"position": {
"x": 640,
"y": 360,
"z": 5000
},
"rotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"viewCenter": {
"x": 0,
"y": 0,
"z": 0
},
"contentRect": {
"x": 1.0373478206705766e-13,
"y": -74.33133732534921,
"width": 701.4000000000001,
"height": 394.5375
},
"scale": 0.5479687500000001
},
"1a23cd3e-e487-4fd1-a415-346c2087464d": {
"position": {
"x": 360,
"y": 640,
"z": 5000
},
"rotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"viewCenter": {
"x": 0,
"y": 0,
"z": 0
},
"contentRect": {
"x": 0,
"y": 0,
"width": 267.75,
"height": 476
},
"scale": 0.371875
},
"5de6e399-8fdd-4be1-91fa-38439f59cc9b": {
"position": {
"x": 360,
"y": 640,
"z": 5000
},
"rotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"viewCenter": {
"x": 0,
"y": 0,
"z": 0
},
"contentRect": {
"x": 77.6470588235294,
"y": 498.8235294117647,
"width": 267.75,
"height": 476
},
"scale": 0.371875
},
"022d7be0-2614-43b7-b842-16a35156d49f": {
"position": {
"x": 360,
"y": 640,
"z": 5000
},
"rotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"viewCenter": {
"x": 0,
"y": 0,
"z": 0
},
"contentRect": {
"x": 0,
"y": 0,
"width": 267.75,
"height": 476
},
"scale": 0.371875
},
"1af15364-46a2-4eda-bfa1-afbc13cef7ed": {
"position": {
"x": 289.5058092012657,
"y": 678.8326237675253,
"z": 5000
},
"rotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"viewCenter": {
"x": 0,
"y": 0,
"z": 0
},
"contentRect": {
"x": -135.65154891336527,
"y": -77.00267954737429,
"width": 267.75,
"height": 476
},
"scale": 0.3148834130348147
},
"16b0d021-6436-4bbc-ba5e-05ebe3e84ba4": {
"position": {
"x": -429.552165644928,
"y": 203.77738036213248,
"z": 5000
},
"rotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"viewCenter": {
"x": 0,
"y": 0,
"z": 0
},
"contentRect": {
"x": -719.4329589900423,
"y": -311.56625225140397,
"width": 210,
"height": 105
},
"scale": 0.46182776877051207
}
},
"camera-uuids": [
"1fcc05e5-18d9-4302-b271-815963b8fb27",
"1a23cd3e-e487-4fd1-a415-346c2087464d",
"5de6e399-8fdd-4be1-91fa-38439f59cc9b",
"022d7be0-2614-43b7-b842-16a35156d49f",
"1af15364-46a2-4eda-bfa1-afbc13cef7ed",
"16b0d021-6436-4bbc-ba5e-05ebe3e84ba4"
],
"camera": {
"color": [
48,
48,
48,
255
],
"fov": 45,
"far": 10000,
"near": 0.01,
"wheelSpeed": 0.01,
"wanderSpeed": 10,
"enableAcceleration": true,
"size": "__default_design__",
"far2D": 10000,
"near2D": 1,
"wheelSpeed2D": 6,
"iso": 0,
"aperture": 19,
"shutter": 7
}
}
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f91ad64f-2181-4837-ad59-fcbea808cf50",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f91ad64f-2181-4837-ad59-fcbea808cf50@6c48a",
"displayName": "raw5",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f91ad64f-2181-4837-ad59-fcbea808cf50",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "f91ad64f-2181-4837-ad59-fcbea808cf50@f9941",
"displayName": "raw5",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 572,
"height": 728,
"rawWidth": 572,
"rawHeight": 728,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-286,
-364,
0,
286,
-364,
0,
-286,
364,
0,
286,
364,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
728,
572,
728,
0,
0,
572,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-286,
-364,
0
],
"maxPos": [
286,
364,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f91ad64f-2181-4837-ad59-fcbea808cf50@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "f91ad64f-2181-4837-ad59-fcbea808cf50@6c48a"
}
}