This commit is contained in:
2025-07-17 17:18:21 +08:00
commit 1ffc1b5cf0
5309 changed files with 1150310 additions and 0 deletions
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "fa6873cf-9fc9-419f-8595-381b5a25a507",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "fa6873cf-9fc9-419f-8595-381b5a25a507@6c48a",
"displayName": "maki_anna_2_cg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "fa6873cf-9fc9-419f-8595-381b5a25a507",
"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": "fa6873cf-9fc9-419f-8595-381b5a25a507@f9941",
"displayName": "maki_anna_2_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": "fa6873cf-9fc9-419f-8595-381b5a25a507@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "fa6873cf-9fc9-419f-8595-381b5a25a507@6c48a"
}
}
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "ec1c77eb-f06a-4e38-bdd8-c0fe43b0697b",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "ec1c77eb-f06a-4e38-bdd8-c0fe43b0697b@6c48a",
"displayName": "xinfu_laugh",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "ec1c77eb-f06a-4e38-bdd8-c0fe43b0697b",
"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": "ec1c77eb-f06a-4e38-bdd8-c0fe43b0697b@f9941",
"displayName": "xinfu_laugh",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -15,
"offsetY": -8,
"trimX": 26,
"trimY": 16,
"width": 843,
"height": 1173,
"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": [
-421.5,
-586.5,
0,
421.5,
-586.5,
0,
-421.5,
586.5,
0,
421.5,
586.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
26,
1173,
869,
1173,
26,
0,
869,
0
],
"nuv": [
0.02810810810810811,
0,
0.9394594594594594,
0,
0.02810810810810811,
0.9865433137089992,
0.9394594594594594,
0.9865433137089992
],
"minPos": [
-421.5,
-586.5,
0
],
"maxPos": [
421.5,
586.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "ec1c77eb-f06a-4e38-bdd8-c0fe43b0697b@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "ec1c77eb-f06a-4e38-bdd8-c0fe43b0697b@6c48a"
}
}
@@ -0,0 +1,231 @@
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,
/**收藏奖励 */
shoucangJiangli = 5,
}
//关卡内看广告弹窗界面
@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.btnCancel, ()=>{
if (this._data.closeCallback) {
this._data.closeCallback();
}
this.onClose();
}, this);
GButton.BandClick(this._nodeTab.btnFree, ()=>{
if (this._data.adCallback) {
this._data.adCallback(true);
}
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);
//关卡内聊天不再显示分享按钮
let showshare = false
if (this._data.type == E_AD_TARGET.xiangqin) {
showshare = true
}
this._nodeTab.btnShare.active = showshare;
this._nodeTab.btnCancel.active = !showshare;
//免费使用次数逻辑
let isfree = false
if (this._data.type == E_AD_TARGET.baoji) {
let levelData = GameManager.CurLevelData
if (levelData) {
if (levelData.first_strength == undefined || levelData.first_strength == 0) {
isfree = true
}
}
} else if (this._data.type == E_AD_TARGET.chehui) {
let levelData = GameManager.CurLevelData
if (levelData) {
if (levelData.first_cancel == undefined || levelData.first_cancel == 0) {
isfree = true
}
}
}
this._nodeTab.btnFree.active = isfree;
this._nodeTab.btnAD.active = !isfree;
//次数用完后置灰按钮
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,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "c7c0e2e6-f5f3-443d-a306-01ef3e57216d",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "c7c0e2e6-f5f3-443d-a306-01ef3e57216d@6c48a",
"displayName": "ninian_default",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "c7c0e2e6-f5f3-443d-a306-01ef3e57216d",
"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": "c7c0e2e6-f5f3-443d-a306-01ef3e57216d@f9941",
"displayName": "ninian_default",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 70,
"offsetY": -7,
"trimX": 140,
"trimY": 14,
"width": 660,
"height": 1015,
"rawWidth": 800,
"rawHeight": 1029,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-330,
-507.5,
0,
330,
-507.5,
0,
-330,
507.5,
0,
330,
507.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
140,
1015,
800,
1015,
140,
0,
800,
0
],
"nuv": [
0.175,
0,
1,
0,
0.175,
0.9863945578231292,
1,
0.9863945578231292
],
"minPos": [
-330,
-507.5,
0
],
"maxPos": [
330,
507.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "c7c0e2e6-f5f3-443d-a306-01ef3e57216d@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "c7c0e2e6-f5f3-443d-a306-01ef3e57216d@6c48a"
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "b9d4ca58-144c-4062-8a4d-702cf26966ce",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "b9d4ca58-144c-4062-8a4d-702cf26966ce@6c48a",
"displayName": "tarenaya_2_cg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "b9d4ca58-144c-4062-8a4d-702cf26966ce",
"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": "b9d4ca58-144c-4062-8a4d-702cf26966ce@f9941",
"displayName": "tarenaya_2_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": "b9d4ca58-144c-4062-8a4d-702cf26966ce@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "b9d4ca58-144c-4062-8a4d-702cf26966ce@6c48a"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB