更新 优化 游戏内功能

This commit is contained in:
COMPUTER\EDY 2025-12-24 16:21:14 +08:00
parent 2cdee72fe1
commit 740a1c3bf7
11 changed files with 43 additions and 32 deletions

View File

@ -2727,7 +2727,7 @@
"__id__": 59 "__id__": 59
} }
], ],
"_active": false, "_active": true,
"_components": [], "_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
@ -2889,9 +2889,9 @@
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 0, "r": 43,
"g": 126, "g": 161,
"b": 81, "b": 119,
"a": 255 "a": 255
}, },
"_contentSize": { "_contentSize": {
@ -23914,7 +23914,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "snow", "_name": "New Sprite",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 549 "__id__": 549
@ -23975,7 +23975,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "57Jj49hjhB/IjIYaKr/0dU" "_id": "dfTmaQPZhP2Ix1UZaSsYhR"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
@ -23992,9 +23992,11 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": null, "_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -24005,7 +24007,7 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "2bcu5aMTJNR6oODV5J/k9N" "_id": "261B3Em/hFEYAUHj+xC1wf"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
@ -24032,7 +24034,7 @@
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 40, "_originalWidth": 40,
"_originalHeight": 36, "_originalHeight": 36,
"_id": "fbxK6OjL1B/51Esr/XOCZN" "_id": "28DG1qweVHkIaUIntr+PXW"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",

View File

@ -257,6 +257,11 @@ export default class JiaZai extends cc.Component {
}); });
} }
else {
if (JiaZai.cachedRewardPrefab) {
this.getOrder();
}
}
if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) { if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) {
@ -1562,7 +1567,7 @@ export default class JiaZai extends cc.Component {
} }
if (data.data != null && data.code == 0) { if (data.data != null && data.code == 0) {
//console.log("未到期已领取"); console.log("未到期已领取");
} }
if (data.code == 1) { if (data.code == 1) {
this.getcard.active = true; this.getcard.active = true;

View File

@ -2025,7 +2025,6 @@ export default class MapConroler extends cc.Component {
freezeBlock[i].getChildByName("freeze").getComponent("Freeze").reduce(1); freezeBlock[i].getChildByName("freeze").getComponent("Freeze").reduce(1);
} }
} }
console.log("冻结方块数量", freezeBlock.length);
let floorBlock = this.node.children.filter(child => { let floorBlock = this.node.children.filter(child => {
if (child.getComponent("Block")) { if (child.getComponent("Block")) {

View File

@ -55,6 +55,11 @@ export default class Boom extends cc.Component {
} }
reduceTime(num) { reduceTime(num) {
if (this.node.parent) {
if (this.node.parent.getComponent("Block").block_Info.floor) {
return;
}
}
if (this.node.name == "boom2") { if (this.node.name == "boom2") {
this.time -= num; this.time -= num;
if (this.time <= 0) this.time = 0; if (this.time <= 0) this.time = 0;

View File

@ -6698,7 +6698,7 @@
"__id__": 403 "__id__": 403
} }
], ],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 419 "__id__": 419
@ -7060,7 +7060,7 @@
"_isSystemFontUsed": true, "_isSystemFontUsed": true,
"_spacingX": 0, "_spacingX": 0,
"_batchAsBitmap": false, "_batchAsBitmap": false,
"_styleFlags": 0, "_styleFlags": 1,
"_underlineHeight": 0, "_underlineHeight": 0,
"_N$horizontalAlign": 2, "_N$horizontalAlign": 2,
"_N$verticalAlign": 2, "_N$verticalAlign": 2,
@ -7168,7 +7168,7 @@
"_isSystemFontUsed": true, "_isSystemFontUsed": true,
"_spacingX": 0, "_spacingX": 0,
"_batchAsBitmap": false, "_batchAsBitmap": false,
"_styleFlags": 0, "_styleFlags": 1,
"_underlineHeight": 0, "_underlineHeight": 0,
"_N$horizontalAlign": 1, "_N$horizontalAlign": 1,
"_N$verticalAlign": 2, "_N$verticalAlign": 2,

View File

@ -7,7 +7,7 @@
9, 9,
9 9
], ],
"time": 140, "time": 170,
"gap": [ "gap": [
{ {
"x": 3, "x": 3,

View File

@ -7,7 +7,7 @@
9, 9,
11 11
], ],
"time": 100, "time": 130,
"gap": [ "gap": [
{ {
"x": 1, "x": 1,

View File

@ -7,7 +7,7 @@
7, 7,
9 9
], ],
"time": 150, "time": 180,
"gap": [ "gap": [
{ {
"x": 1, "x": 1,

View File

@ -97,7 +97,7 @@
}, },
{ {
"block": 1, "block": 1,
"color": 9, "color": 8,
"type": 0, "type": 0,
"position": { "position": {
"x": -180, "x": -180,
@ -108,7 +108,7 @@
}, },
{ {
"block": 1, "block": 1,
"color": 3, "color": 9,
"type": 0, "type": 0,
"position": { "position": {
"x": 420, "x": 420,
@ -141,7 +141,7 @@
}, },
{ {
"block": 2, "block": 2,
"color": 7, "color": 3,
"type": 0, "type": 0,
"position": { "position": {
"x": 180, "x": 180,
@ -152,7 +152,7 @@
}, },
{ {
"block": 0, "block": 0,
"color": 3, "color": 9,
"type": 0, "type": 0,
"position": { "position": {
"x": 300, "x": 300,
@ -166,7 +166,7 @@
"color": 11, "color": 11,
"type": 0, "type": 0,
"position": { "position": {
"x": 300, "x": 180,
"y": 120, "y": 120,
"z": 0 "z": 0
}, },
@ -174,7 +174,7 @@
}, },
{ {
"block": 0, "block": 0,
"color": 9, "color": 8,
"type": 6, "type": 6,
"position": { "position": {
"x": -180, "x": -180,
@ -186,7 +186,7 @@
}, },
{ {
"block": 2, "block": 2,
"color": 7, "color": 3,
"type": 1, "type": 1,
"position": { "position": {
"x": -60, "x": -60,
@ -257,7 +257,7 @@
{ {
"id": 497, "id": 497,
"num": 0, "num": 0,
"color": 3, "color": 9,
"special": 0, "special": 0,
"length": 1 "length": 1
}, },
@ -278,14 +278,14 @@
{ {
"id": 500, "id": 500,
"num": 7, "num": 7,
"color": 7, "color": 3,
"special": 0, "special": 0,
"length": 2 "length": 2
}, },
{ {
"id": 501, "id": 501,
"num": 11, "num": 11,
"color": 7, "color": 3,
"special": 0, "special": 0,
"length": 0 "length": 0
}, },
@ -327,7 +327,7 @@
{ {
"id": 507, "id": 507,
"num": 23, "num": 23,
"color": 9, "color": 8,
"special": 0, "special": 0,
"length": 1 "length": 1
}, },

View File

@ -65,7 +65,7 @@ CCProgram fs %{
uniform sampler2D texture; uniform sampler2D texture;
#endif #endif
#define LAYERS 6 #define LAYERS 20
#define DEPTH .4 #define DEPTH .4
#define WIDTH .3 #define WIDTH .3
#define SPEED .3 #define SPEED .3

View File

@ -6,11 +6,11 @@
{ {
"glsl1": { "glsl1": {
"vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}",
"frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n#endif\nuniform vec4 cc_time;\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n const mat3 p = mat3(13.323122,23.5112,21.71123,21.1212,28.7312,11.9312,21.8112,14.7212,61.3934);\nvec2 uv = 500./1000. + vec2(1.,1.)*gl_FragCoord.xy / 1000.;\nvec3 acc = vec3(0.0);\nfloat dof = 5.*sin(cc_time.x*.1);\nfor (int i=0;i<6;i++) {\n float fi = float(i);\n vec2 q = uv*(1.+fi*.4);\n float shouldDrift = step(0.6, fract(fi * 7.238917));\n float driftAmount = shouldDrift * .2 * sin(cc_time.x * 0.5 + fi * 1.5) * (1.0 + 0.5 * sin(fi * 3.7));\n q += vec2(q.y*(.3*mod(fi*7.238917,1.)-.3*.5) + driftAmount, .3*cc_time.x/(1.+fi*.4*.03));\n vec3 n = vec3(floor(q),31.189+fi);\n vec3 m = floor(n)*.00001 + fract(n);\n vec3 mp = (31415.9+m)/fract(p*m);\n vec3 r = fract(mp);\n vec2 s = abs(mod(q,1.)-.5+.9*r.xy-.45);\n s += .008*abs(2.*fract(8.*q.yx)-1.);\n float d = .5*max(s.x-s.y,s.x+s.y)+max(s.x,s.y)-.01;\n float edge = .004+.04*min(.5*abs(fi-5.-dof),1.);\n float sizeVariation = 0.9 + 0.3 * sin(fi * 2.1);\n acc += vec3(smoothstep(edge,-edge,d)*(r.x/(1.+.02*fi*.4)*sizeVariation));\n}\n float a = 0.;\n if(acc.r+acc.g+acc.b>0.3){\n a = acc.r+acc.g+acc.b;\n }\ngl_FragColor = vec4(vec3(acc*5.),a);\n}" "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n#endif\nuniform vec4 cc_time;\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n const mat3 p = mat3(13.323122,23.5112,21.71123,21.1212,28.7312,11.9312,21.8112,14.7212,61.3934);\nvec2 uv = 500./1000. + vec2(1.,1.)*gl_FragCoord.xy / 1000.;\nvec3 acc = vec3(0.0);\nfloat dof = 5.*sin(cc_time.x*.1);\nfor (int i=0;i<20;i++) {\n float fi = float(i);\n vec2 q = uv*(1.+fi*.4);\n float shouldDrift = step(0.6, fract(fi * 7.238917));\n float driftAmount = shouldDrift * .2 * sin(cc_time.x * 0.5 + fi * 1.5) * (1.0 + 0.5 * sin(fi * 3.7));\n q += vec2(q.y*(.3*mod(fi*7.238917,1.)-.3*.5) + driftAmount, .3*cc_time.x/(1.+fi*.4*.03));\n vec3 n = vec3(floor(q),31.189+fi);\n vec3 m = floor(n)*.00001 + fract(n);\n vec3 mp = (31415.9+m)/fract(p*m);\n vec3 r = fract(mp);\n vec2 s = abs(mod(q,1.)-.5+.9*r.xy-.45);\n s += .008*abs(2.*fract(8.*q.yx)-1.);\n float d = .5*max(s.x-s.y,s.x+s.y)+max(s.x,s.y)-.01;\n float edge = .004+.04*min(.5*abs(fi-5.-dof),1.);\n float sizeVariation = 0.9 + 0.3 * sin(fi * 2.1);\n acc += vec3(smoothstep(edge,-edge,d)*(r.x/(1.+.02*fi*.4)*sizeVariation));\n}\n float a = 0.;\n if(acc.r+acc.g+acc.b>0.3){\n a = acc.r+acc.g+acc.b;\n }\ngl_FragColor = vec4(vec3(acc*5.),a);\n}"
}, },
"glsl3": { "glsl3": {
"vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}",
"frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n const mat3 p = mat3(13.323122,23.5112,21.71123,21.1212,28.7312,11.9312,21.8112,14.7212,61.3934);\nvec2 uv = 500./1000. + vec2(1.,1.)*gl_FragCoord.xy / 1000.;\nvec3 acc = vec3(0.0);\nfloat dof = 5.*sin(cc_time.x*.1);\nfor (int i=0;i<6;i++) {\n float fi = float(i);\n vec2 q = uv*(1.+fi*.4);\n float shouldDrift = step(0.6, fract(fi * 7.238917));\n float driftAmount = shouldDrift * .2 * sin(cc_time.x * 0.5 + fi * 1.5) * (1.0 + 0.5 * sin(fi * 3.7));\n q += vec2(q.y*(.3*mod(fi*7.238917,1.)-.3*.5) + driftAmount, .3*cc_time.x/(1.+fi*.4*.03));\n vec3 n = vec3(floor(q),31.189+fi);\n vec3 m = floor(n)*.00001 + fract(n);\n vec3 mp = (31415.9+m)/fract(p*m);\n vec3 r = fract(mp);\n vec2 s = abs(mod(q,1.)-.5+.9*r.xy-.45);\n s += .008*abs(2.*fract(8.*q.yx)-1.);\n float d = .5*max(s.x-s.y,s.x+s.y)+max(s.x,s.y)-.01;\n float edge = .004+.04*min(.5*abs(fi-5.-dof),1.);\n float sizeVariation = 0.9 + 0.3 * sin(fi * 2.1);\n acc += vec3(smoothstep(edge,-edge,d)*(r.x/(1.+.02*fi*.4)*sizeVariation));\n}\n float a = 0.;\n if(acc.r+acc.g+acc.b>0.3){\n a = acc.r+acc.g+acc.b;\n }\ngl_FragColor = vec4(vec3(acc*5.),a);\n}" "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n const mat3 p = mat3(13.323122,23.5112,21.71123,21.1212,28.7312,11.9312,21.8112,14.7212,61.3934);\nvec2 uv = 500./1000. + vec2(1.,1.)*gl_FragCoord.xy / 1000.;\nvec3 acc = vec3(0.0);\nfloat dof = 5.*sin(cc_time.x*.1);\nfor (int i=0;i<20;i++) {\n float fi = float(i);\n vec2 q = uv*(1.+fi*.4);\n float shouldDrift = step(0.6, fract(fi * 7.238917));\n float driftAmount = shouldDrift * .2 * sin(cc_time.x * 0.5 + fi * 1.5) * (1.0 + 0.5 * sin(fi * 3.7));\n q += vec2(q.y*(.3*mod(fi*7.238917,1.)-.3*.5) + driftAmount, .3*cc_time.x/(1.+fi*.4*.03));\n vec3 n = vec3(floor(q),31.189+fi);\n vec3 m = floor(n)*.00001 + fract(n);\n vec3 mp = (31415.9+m)/fract(p*m);\n vec3 r = fract(mp);\n vec2 s = abs(mod(q,1.)-.5+.9*r.xy-.45);\n s += .008*abs(2.*fract(8.*q.yx)-1.);\n float d = .5*max(s.x-s.y,s.x+s.y)+max(s.x,s.y)-.01;\n float edge = .004+.04*min(.5*abs(fi-5.-dof),1.);\n float sizeVariation = 0.9 + 0.3 * sin(fi * 2.1);\n acc += vec3(smoothstep(edge,-edge,d)*(r.x/(1.+.02*fi*.4)*sizeVariation));\n}\n float a = 0.;\n if(acc.r+acc.g+acc.b>0.3){\n a = acc.r+acc.g+acc.b;\n }\ngl_FragColor = vec4(vec3(acc*5.),a);\n}"
} }
} }
], ],