Commit 3e700516 by 江龙

调整位置

parent 6001609e
...@@ -15,5 +15,5 @@ ...@@ -15,5 +15,5 @@
"icon2Url": "https://oss.xxzsgame.com/hongmengicon/shejitianfuge2.png", "icon2Url": "https://oss.xxzsgame.com/hongmengicon/shejitianfuge2.png",
"socketWs": "ws://47.97.42.168:8765", "socketWs": "ws://47.97.42.168:8765",
"socketUrl": "wss://hongmeng.xxzsgame.com", "socketUrl": "wss://hongmeng.xxzsgame.com",
"runCode": "let intervalId=setInterval(()=>{var p=[{i:1,t:'we'},{i:0,t:'we'},{i:8,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:12,t:'we'},{i:0,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;n._parent.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:7,t:'we'},{i:1,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;n._parent.visible=false;}var p=[{i:0,t:'we'},{i:0,t:'we'},{i:5,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:0,t:'we'},{i:0,t:'we'},{i:4,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:0,t:'we'},{i:0,t:'we'},{i:6,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:2,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:1,t:'we'},{i:12,t:'we'},{i:0,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;n._parent.visible=false;}var p=[{i:1,t:'we'},{i:1,t:'we'},{i:8,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:1,t:'we'},{i:7,t:'we'},{i:1,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;n._parent.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:5,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:6,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:4,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}},100);(function() { var cfg = {'url':'https://oss.xxzsgame.com/hongmengicon/shejitianfuge1.png','x':100,'y':100,'w':120,'h':120,'childName':'__HackImg_3048'}; var path = [{'i':1,'t':'we'},{'i':0,'t':'we'},{'i':0,'t':'t','s':'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Icon_atlas_map37l.jpg'}]; function getSkin(node){ let url = node.skin || node.source || node.url || ''; if(node._source && node._source._bitmap && node._source._bitmap._url){ url = node._source._bitmap._url; } return url; } function setSize(node, w, h) { if (window.cc) { if (node.getComponent && cc.UITransform) { var uiTransform = node.getComponent(cc.UITransform); if (uiTransform) { uiTransform.setContentSize(w, h); } } else { node.width = w; node.height = h; } } else if (window.Laya) { node.size(w, h); } } var timerId = setInterval(function() { try { var parent = null; if (window.cc && window.cc.director) parent = cc.director.getScene(); else if (window.Laya) parent = Laya.stage; if (!parent) return; for (var i = 0; i < path.length; i++) { var s = path[i]; if (window.cc) { if (!parent.children) { parent = null; break; } var candidates = []; var children = parent.children; for(var k=0; k<children.length; k++){ if(children[k].name === s.n) candidates.push(children[k]); } if (s.t && window.cc[s.t]) { var filtered = []; for(var k=0; k<candidates.length; k++){ if(candidates[k].getComponent(window.cc[s.t])) filtered.push(candidates[k]); } candidates = filtered; } parent = candidates[s.i || 0]; } else { if (parent.getChildAt) { var node = parent.getChildAt(s.i); if (node && s.t && node.constructor.name != s.t || node && s.s && getSkin(node) != s.s) node = null; parent = node; } else { parent = null; } } if (!parent) break; } if (!parent) return; var child = parent.getChildByName(cfg.childName); if (child) return; if (window.cc) { var node = new cc.Node(cfg.childName); node.setPosition(cfg.x, cfg.y); var sprite = node.addComponent(cc.Sprite); if (cc.Sprite.SizeMode && cc.Sprite.SizeMode.CUSTOM !== undefined) { sprite.sizeMode = cc.Sprite.SizeMode.CUSTOM; } else if (sprite.sizeMode !== undefined) { sprite.sizeMode = 0; } if (cc.ENGINE_VERSION && cc.ENGINE_VERSION.startsWith('3')) { cc.assetManager.loadRemote(cfg.url, function(err, imageAsset) { if (!err && sprite && sprite.isValid) { const spriteFrame = new cc.SpriteFrame(); const texture = new cc.Texture2D(); texture.image = imageAsset; spriteFrame.texture = texture; sprite.spriteFrame = spriteFrame; setSize(node, cfg.w, cfg.h); } }); } else if (cc.ENGINE_VERSION && cc.ENGINE_VERSION.startsWith('2')) { cc.loader.load(cfg.url, function(err, tex) { if (!err && sprite && sprite.isValid) { if (cc.SpriteFrame && tex instanceof cc.Texture2D) { sprite.spriteFrame = new cc.SpriteFrame(tex); } else { sprite.spriteFrame = tex; } setSize(node, cfg.w, cfg.h); } }); } var evt = (cc.Node.EventType && cc.Node.EventType.TOUCH_END) ? cc.Node.EventType.TOUCH_END : 'touchend'; node.on(evt, function() { if (window.VideoClient && window.VideoClient.toggleChange) window.VideoClient.toggleChange(); }); if (parent.group !== undefined) node.group = parent.group; if (parent.layer !== undefined) node.layer = parent.layer; parent.addChild(node); } else if (window.Laya) { var img = new Laya.Image(); img.name = cfg.childName; img.skin = cfg.url; img.pos(cfg.x, cfg.y); img.size(cfg.w, cfg.h); img.mouseEnabled = true; img.on(Laya.Event.CLICK, img, function() { if (window.VideoClient && window.VideoClient.toggleChange) window.VideoClient.toggleChange(); }); parent._parent.addChild(img); } } catch(e) { } }, 1000); })();(function() { var cfg = {'url':'https://oss.xxzsgame.com/hongmengicon/shejitianfuge1.png','x':100,'y':100,'w':120,'h':120,'childName':'__HackImg_3048'}; var path = [{'i':1,'t':'we'},{'i':1,'t':'we'},{'i':0,'t':'t','s':'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Icon_atlas_map37l.jpg'}]; function getSkin(node){ let url = node.skin || node.source || node.url || ''; if(node._source && node._source._bitmap && node._source._bitmap._url){ url = node._source._bitmap._url; } return url; } function setSize(node, w, h) { if (window.cc) { if (node.getComponent && cc.UITransform) { var uiTransform = node.getComponent(cc.UITransform); if (uiTransform) { uiTransform.setContentSize(w, h); } } else { node.width = w; node.height = h; } } else if (window.Laya) { node.size(w, h); } } var timerId = setInterval(function() { try { var parent = null; if (window.cc && window.cc.director) parent = cc.director.getScene(); else if (window.Laya) parent = Laya.stage; if (!parent) return; for (var i = 0; i < path.length; i++) { var s = path[i]; if (window.cc) { if (!parent.children) { parent = null; break; } var candidates = []; var children = parent.children; for(var k=0; k<children.length; k++){ if(children[k].name === s.n) candidates.push(children[k]); } if (s.t && window.cc[s.t]) { var filtered = []; for(var k=0; k<candidates.length; k++){ if(candidates[k].getComponent(window.cc[s.t])) filtered.push(candidates[k]); } candidates = filtered; } parent = candidates[s.i || 0]; } else { if (parent.getChildAt) { var node = parent.getChildAt(s.i); if (node && s.t && node.constructor.name != s.t || node && s.s && getSkin(node) != s.s) node = null; parent = node; } else { parent = null; } } if (!parent) break; } if (!parent) return; var child = parent.getChildByName(cfg.childName); if (child) return; if (window.cc) { var node = new cc.Node(cfg.childName); node.setPosition(cfg.x, cfg.y); var sprite = node.addComponent(cc.Sprite); if (cc.Sprite.SizeMode && cc.Sprite.SizeMode.CUSTOM !== undefined) { sprite.sizeMode = cc.Sprite.SizeMode.CUSTOM; } else if (sprite.sizeMode !== undefined) { sprite.sizeMode = 0; } if (cc.ENGINE_VERSION && cc.ENGINE_VERSION.startsWith('3')) { cc.assetManager.loadRemote(cfg.url, function(err, imageAsset) { if (!err && sprite && sprite.isValid) { const spriteFrame = new cc.SpriteFrame(); const texture = new cc.Texture2D(); texture.image = imageAsset; spriteFrame.texture = texture; sprite.spriteFrame = spriteFrame; setSize(node, cfg.w, cfg.h); } }); } else if (cc.ENGINE_VERSION && cc.ENGINE_VERSION.startsWith('2')) { cc.loader.load(cfg.url, function(err, tex) { if (!err && sprite && sprite.isValid) { if (cc.SpriteFrame && tex instanceof cc.Texture2D) { sprite.spriteFrame = new cc.SpriteFrame(tex); } else { sprite.spriteFrame = tex; } setSize(node, cfg.w, cfg.h); } }); } var evt = (cc.Node.EventType && cc.Node.EventType.TOUCH_END) ? cc.Node.EventType.TOUCH_END : 'touchend'; node.on(evt, function() { if (window.VideoClient && window.VideoClient.toggleChange) window.VideoClient.toggleChange(); }); if (parent.group !== undefined) node.group = parent.group; if (parent.layer !== undefined) node.layer = parent.layer; parent.addChild(node); } else if (window.Laya) { var img = new Laya.Image(); img.name = cfg.childName; img.skin = cfg.url; img.pos(cfg.x, cfg.y); img.size(cfg.w, cfg.h); img.mouseEnabled = true; img.on(Laya.Event.CLICK, img, function() { if (window.VideoClient && window.VideoClient.toggleChange) window.VideoClient.toggleChange(); }); parent._parent.addChild(img); } } catch(e) { } }, 1000); })();var t=setInterval(function(){if(window.Ad&&window.Ad.showVideoAd){clearInterval(t);window.Ad.showVideoAd=function(s,f){window.VideoClient?window.VideoClient.callVideo(function(r){r?s&&s():f&&f()}):f&&f()}}},500);" "runCode": "let intervalId=setInterval(()=>{var p=[{i:1,t:'we'},{i:0,t:'we'},{i:8,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:12,t:'we'},{i:0,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;n._parent.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:7,t:'we'},{i:1,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;n._parent.visible=false;}var p=[{i:0,t:'we'},{i:0,t:'we'},{i:5,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:0,t:'we'},{i:0,t:'we'},{i:4,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:0,t:'we'},{i:0,t:'we'},{i:6,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:2,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:1,t:'we'},{i:12,t:'we'},{i:0,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;n._parent.visible=false;}var p=[{i:1,t:'we'},{i:1,t:'we'},{i:8,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:1,t:'we'},{i:7,t:'we'},{i:1,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Home_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;n._parent.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:5,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:6,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}var p=[{i:1,t:'we'},{i:0,t:'we'},{i:4,t:'t',s:'https://cdn.game.chot.cn/resource/chot/yw/cjss/loading/Loading_atlas0.png'}],n=Laya.stage;for(var k=0;k<p.length;k++){var c=p[k];n=n.getChildAt(c.i);if(!n || (c.t && n.constructor.name!=c.t) || (c.s && (n.skin!=c.s && n.source!=c.s && n.url!=c.s && (!n.texture || n.texture.url!=c.s) && (!n._bitmap || n._bitmap.url!=c.s) && (!n._source || !n._source._bitmap || n._source._bitmap._url!=c.s)))){n=null;break}}if(n){n.visible=false;}},100);(function() { var cfg = {'url':'https://oss.xxzsgame.com/hongmengicon/shejitianfuge1.png','x':150,'y':50,'w':120,'h':120,'childName':'__HackImg_3048'}; var path = [{'i':1,'t':'we'},{'i':0,'t':'we'},{'i':0,'t':'t','s':'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Icon_atlas_map37l.jpg'}]; function getSkin(node){ let url = node.skin || node.source || node.url || ''; if(node._source && node._source._bitmap && node._source._bitmap._url){ url = node._source._bitmap._url; } return url; } function setSize(node, w, h) { if (window.cc) { if (node.getComponent && cc.UITransform) { var uiTransform = node.getComponent(cc.UITransform); if (uiTransform) { uiTransform.setContentSize(w, h); } } else { node.width = w; node.height = h; } } else if (window.Laya) { node.size(w, h); } } var timerId = setInterval(function() { try { var parent = null; if (window.cc && window.cc.director) parent = cc.director.getScene(); else if (window.Laya) parent = Laya.stage; if (!parent) return; for (var i = 0; i < path.length; i++) { var s = path[i]; if (window.cc) { if (!parent.children) { parent = null; break; } var candidates = []; var children = parent.children; for(var k=0; k<children.length; k++){ if(children[k].name === s.n) candidates.push(children[k]); } if (s.t && window.cc[s.t]) { var filtered = []; for(var k=0; k<candidates.length; k++){ if(candidates[k].getComponent(window.cc[s.t])) filtered.push(candidates[k]); } candidates = filtered; } parent = candidates[s.i || 0]; } else { if (parent.getChildAt) { var node = parent.getChildAt(s.i); if (node && s.t && node.constructor.name != s.t || node && s.s && getSkin(node) != s.s) node = null; parent = node; } else { parent = null; } } if (!parent) break; } if (!parent) return; var child = parent.getChildByName(cfg.childName); if (child) return; if (window.cc) { var node = new cc.Node(cfg.childName); node.setPosition(cfg.x, cfg.y); var sprite = node.addComponent(cc.Sprite); if (cc.Sprite.SizeMode && cc.Sprite.SizeMode.CUSTOM !== undefined) { sprite.sizeMode = cc.Sprite.SizeMode.CUSTOM; } else if (sprite.sizeMode !== undefined) { sprite.sizeMode = 0; } if (cc.ENGINE_VERSION && cc.ENGINE_VERSION.startsWith('3')) { cc.assetManager.loadRemote(cfg.url, function(err, imageAsset) { if (!err && sprite && sprite.isValid) { const spriteFrame = new cc.SpriteFrame(); const texture = new cc.Texture2D(); texture.image = imageAsset; spriteFrame.texture = texture; sprite.spriteFrame = spriteFrame; setSize(node, cfg.w, cfg.h); } }); } else if (cc.ENGINE_VERSION && cc.ENGINE_VERSION.startsWith('2')) { cc.loader.load(cfg.url, function(err, tex) { if (!err && sprite && sprite.isValid) { if (cc.SpriteFrame && tex instanceof cc.Texture2D) { sprite.spriteFrame = new cc.SpriteFrame(tex); } else { sprite.spriteFrame = tex; } setSize(node, cfg.w, cfg.h); } }); } var evt = (cc.Node.EventType && cc.Node.EventType.TOUCH_END) ? cc.Node.EventType.TOUCH_END : 'touchend'; node.on(evt, function() { if (window.VideoClient && window.VideoClient.toggleChange) window.VideoClient.toggleChange(); }); if (parent.group !== undefined) node.group = parent.group; if (parent.layer !== undefined) node.layer = parent.layer; parent.addChild(node); } else if (window.Laya) { var img = new Laya.Image(); img.name = cfg.childName; img.skin = cfg.url; img.pos(cfg.x, cfg.y); img.size(cfg.w, cfg.h); img.mouseEnabled = true; img.on(Laya.Event.CLICK, img, function() { if (window.VideoClient && window.VideoClient.toggleChange) window.VideoClient.toggleChange(); }); parent._parent.addChild(img); } } catch(e) { } }, 1000); })();(function() { var cfg = {'url':'https://oss.xxzsgame.com/hongmengicon/shejitianfuge1.png','x':150,'y':50,'w':120,'h':120,'childName':'__HackImg_3048'}; var path = [{'i':1,'t':'we'},{'i':1,'t':'we'},{'i':0,'t':'t','s':'https://cdn.game.chot.cn/resource/chot/yw/cjss/res/atlas/fgui_main/Icon_atlas_map37l.jpg'}]; function getSkin(node){ let url = node.skin || node.source || node.url || ''; if(node._source && node._source._bitmap && node._source._bitmap._url){ url = node._source._bitmap._url; } return url; } function setSize(node, w, h) { if (window.cc) { if (node.getComponent && cc.UITransform) { var uiTransform = node.getComponent(cc.UITransform); if (uiTransform) { uiTransform.setContentSize(w, h); } } else { node.width = w; node.height = h; } } else if (window.Laya) { node.size(w, h); } } var timerId = setInterval(function() { try { var parent = null; if (window.cc && window.cc.director) parent = cc.director.getScene(); else if (window.Laya) parent = Laya.stage; if (!parent) return; for (var i = 0; i < path.length; i++) { var s = path[i]; if (window.cc) { if (!parent.children) { parent = null; break; } var candidates = []; var children = parent.children; for(var k=0; k<children.length; k++){ if(children[k].name === s.n) candidates.push(children[k]); } if (s.t && window.cc[s.t]) { var filtered = []; for(var k=0; k<candidates.length; k++){ if(candidates[k].getComponent(window.cc[s.t])) filtered.push(candidates[k]); } candidates = filtered; } parent = candidates[s.i || 0]; } else { if (parent.getChildAt) { var node = parent.getChildAt(s.i); if (node && s.t && node.constructor.name != s.t || node && s.s && getSkin(node) != s.s) node = null; parent = node; } else { parent = null; } } if (!parent) break; } if (!parent) return; var child = parent.getChildByName(cfg.childName); if (child) return; if (window.cc) { var node = new cc.Node(cfg.childName); node.setPosition(cfg.x, cfg.y); var sprite = node.addComponent(cc.Sprite); if (cc.Sprite.SizeMode && cc.Sprite.SizeMode.CUSTOM !== undefined) { sprite.sizeMode = cc.Sprite.SizeMode.CUSTOM; } else if (sprite.sizeMode !== undefined) { sprite.sizeMode = 0; } if (cc.ENGINE_VERSION && cc.ENGINE_VERSION.startsWith('3')) { cc.assetManager.loadRemote(cfg.url, function(err, imageAsset) { if (!err && sprite && sprite.isValid) { const spriteFrame = new cc.SpriteFrame(); const texture = new cc.Texture2D(); texture.image = imageAsset; spriteFrame.texture = texture; sprite.spriteFrame = spriteFrame; setSize(node, cfg.w, cfg.h); } }); } else if (cc.ENGINE_VERSION && cc.ENGINE_VERSION.startsWith('2')) { cc.loader.load(cfg.url, function(err, tex) { if (!err && sprite && sprite.isValid) { if (cc.SpriteFrame && tex instanceof cc.Texture2D) { sprite.spriteFrame = new cc.SpriteFrame(tex); } else { sprite.spriteFrame = tex; } setSize(node, cfg.w, cfg.h); } }); } var evt = (cc.Node.EventType && cc.Node.EventType.TOUCH_END) ? cc.Node.EventType.TOUCH_END : 'touchend'; node.on(evt, function() { if (window.VideoClient && window.VideoClient.toggleChange) window.VideoClient.toggleChange(); }); if (parent.group !== undefined) node.group = parent.group; if (parent.layer !== undefined) node.layer = parent.layer; parent.addChild(node); } else if (window.Laya) { var img = new Laya.Image(); img.name = cfg.childName; img.skin = cfg.url; img.pos(cfg.x, cfg.y); img.size(cfg.w, cfg.h); img.mouseEnabled = true; img.on(Laya.Event.CLICK, img, function() { if (window.VideoClient && window.VideoClient.toggleChange) window.VideoClient.toggleChange(); }); parent._parent.addChild(img); } } catch(e) { } }, 1000); })();var t=setInterval(function(){if(window.Ad&&window.Ad.showVideoAd){clearInterval(t);window.Ad.showVideoAd=function(s,f){window.VideoClient?window.VideoClient.callVideo(function(r){r?s&&s():f&&f()}):f&&f()}}},500);"
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment