Commit 2bd597eb authored by yu's avatar yu

first

parent 9f5f5457
import { asyncDelay, onHomeworkFinish } from "../script/util";
import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent";
const { ccclass, property } = cc._decorator;
@ccclass
export default class SceneComponent extends MyCocosSceneComponent {
addPreloadImage() {
// TODO 根据自己的配置预加载图片资源
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
}
addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: this.data.audio_url });
}
addPreloadAnima() {
}
onLoadEnd() {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initData();
this.initView();
this.initListener();
}
_cantouch = null;
initData() {
// 所有全局变量 默认都是null
this._cantouch = true;
}
initView() {
this.initBg();
this.initPic();
this.initBtn();
this.initIcon();
}
initBg() {
const bgNode = cc.find('Canvas/bg');
bgNode.scale = this._mapScaleMax;
}
pic1 = null;
pic2 = null;
initPic() {
const canvas = cc.find('Canvas');
const maxW = canvas.width * 0.7;
this.getSprNodeByUrl(this.data.pic_url, (sprNode) => {
const picNode1 = sprNode;
picNode1.scale = maxW / picNode1.width;
picNode1.baseX = picNode1.x;
canvas.addChild(picNode1);
this.pic1 = picNode1;
const labelNode = new cc.Node();
labelNode.color = cc.Color.YELLOW;
const label = labelNode.addComponent(cc.Label);
label.string = this.data.text;
label.fontSize = 60;
label.lineHeight = 60;
label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent('cc.Label').font;
picNode1.addChild(labelNode);
});
this.getSprNodeByUrl(this.data.pic_url_2, (sprNode) => {
const picNode2 = sprNode;
picNode2.scale = maxW / picNode2.width;
canvas.addChild(picNode2);
picNode2.x = canvas.width;
picNode2.baseX = picNode2.x;
this.pic2 = picNode2;
const labelNode = new cc.Node();
const label = labelNode.addComponent(cc.RichText);
const size = 60
label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent(cc.Label).font;
label.string = `<outline color=#751e00 width=4><size=${size}><color=#ffffff>${this.data.text}</color></size></outline>`
label.lineHeight = size;
picNode2.addChild(labelNode);
});
}
initIcon() {
const iconNode = this.getSprNode('icon');
iconNode.zIndex = 5;
iconNode.anchorX = 1;
iconNode.anchorY = 1;
iconNode.parent = cc.find('Canvas');
iconNode.x = iconNode.parent.width / 2 - 10;
iconNode.y = iconNode.parent.height / 2 - 10;
iconNode.on(cc.Node.EventType.TOUCH_START, () => {
this.playAudioByUrl(this.data.audio_url);
})
}
curPage = null;
initBtn() {
this.curPage = 0;
const bottomPart = cc.find('Canvas/bottomPart');
bottomPart.zIndex = 5; // 提高层级
bottomPart.x = bottomPart.parent.width / 2;
bottomPart.y = -bottomPart.parent.height / 2;
const leftBtnNode = bottomPart.getChildByName('btn_left');
//节点中添加了button组件 则可以添加click事件监听
leftBtnNode.on('click', () => {
if (!this._cantouch) {
return;
}
if (this.curPage == 0) {
return;
}
this.curPage = 0
this.leftMove();
this.playLocalAudio('btn');
})
const rightBtnNode = bottomPart.getChildByName('btn_right');
//节点中添加了button组件 则可以添加click事件监听
rightBtnNode.on('click', () => {
if (!this._cantouch) {
return;
}
if (this.curPage == 1) {
return;
}
this.curPage = 1
this.rightMove();
// 游戏结束时需要调用这个方法通知系统作业完成
onHomeworkFinish();
this.playLocalAudio('btn');
})
}
leftMove() {
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, { x: this.pic1.baseX }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, { x: this.pic2.baseX }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
.start();
}
rightMove() {
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, { x: this.pic1.baseX - len }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, { x: this.pic2.baseX - len }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
.start();
}
// update (dt) {},
initListener() {
}
playLocalAudio(audioName) {
const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource);
return new Promise((resolve, reject) => {
const id = cc.audioEngine.playEffect(audio.clip, false);
cc.audioEngine.setFinishCallback(id, () => {
resolve(id);
});
})
}
}
export const defaultData = {
"pic_url": "http://staging-teach.cdn.ireadabc.com/ed94332a503c31e0908bd4c6923a2665.png",
"pic_url_2": "http://staging-teach.cdn.ireadabc.com/5fb60317ade0195d35ad8034d5370a7f.png",
"text": "This is a test label.",
"audio_url": "http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3"
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"uuid": "228809a4-1d3c-418e-a9a2-b82dbeacf113",
"isBundle": true,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
"ios": true,
"android": true
},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "cb9fa4ea-66ca-45af-ad31-e445c7b0ef32",
"uuid": "09277557-23b0-49d9-ad61-cf122776e316",
"isBundle": false,
"bundleName": "",
"priority": 1,
......
{
"ver": "2.0.1",
"uuid": "f0680ae0-c079-45ef-abd7-9e63d90b982b",
"uuid": "ec925776-742b-4ba4-8375-1e2208cd8e9d",
"downloadMode": 0,
"duration": 0.130612,
"duration": 3.448163,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "a5ff4ad1-df8b-4b40-a9cc-31ea778c79db",
"downloadMode": 0,
"duration": 0.873878,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "9925546b-a1eb-4952-bb94-ac2c40c29f7c",
"downloadMode": 0,
"duration": 3.474286,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "a1b648d5-4967-4a0b-a038-141154c364ac",
"downloadMode": 0,
"duration": 0.372875,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "8fb4751f-142d-4db6-8f5b-d8d957aaa23e",
"downloadMode": 0,
"duration": 0.45102,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "b9ebcf1b-1ed0-4777-854d-e58b4ac505a0",
"downloadMode": 0,
"duration": 1.808583,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "e48de654-84b0-450d-88ee-37dc58ee3ab0",
"downloadMode": 0,
"duration": 0.6818,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "0853721c-3f55-4eb2-873d-e3081cfadd4b",
"uuid": "b5c87437-fda6-4154-b08b-36c9ca630c1c",
"isBundle": false,
"bundleName": "",
"priority": 1,
......
{
"ver": "1.0.1",
"uuid": "fd49a141-f242-4ee4-9e64-d670f315fbc5",
"subMetas": {}
}
\ No newline at end of file
{"width":256,"imagePath":"L2BG2-下雪动效_tex.png","height":128,"name":"L2BG2-下雪动效","SubTexture":[{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17","x":83},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝","x":42},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_7","x":83},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_2","x":1},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_6","x":124},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_3","x":165},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_9","x":124},{"width":39,"y":45,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_8","x":1},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_4","x":42},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17 拷贝 5_0","x":165},{"width":39,"y":1,"height":42,"name":"下雪效果9秒内循环/图层17_拷贝_5","x":206}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "d1f4c60a-035a-49cd-9f70-27df430f3cf9",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "7071fa59-b4c7-4eba-abf3-654cb611379e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 256,
"height": 128,
"platformSettings": {},
"subMetas": {
"L2BG2-下雪动效_tex": {
"ver": "1.0.4",
"uuid": "be0c61eb-9b94-44d6-84ba-9f973bc9707b",
"rawTextureUuid": "7071fa59-b4c7-4eba-abf3-654cb611379e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -5,
"offsetY": 20,
"trimX": 1,
"trimY": 1,
"width": 244,
"height": 86,
"rawWidth": 256,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{"frameRate":24,"name":"grow","version":"5.5","compatibleVersion":"5.5","armature":[{"type":"Armature","frameRate":24,"name":"Armature","aabb":{"x":-12.03,"y":87.9,"width":114,"height":114},"bone":[{"name":"root","transform":{"skX":0.8267,"skY":0.8267}},{"name":"bone","parent":"root","transform":{"x":1040.062,"y":-391.2294}},{"name":"point10","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point9","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point8","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point7","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point6","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point1","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point2","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point4","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point5","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point3","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}},{"name":"point","parent":"bone","transform":{"skX":-2.9955,"skY":-2.9955}}],"slot":[{"name":"生长光点","parent":"point","color":{"aM":0}},{"name":"生长光点1","parent":"point1","color":{"aM":0}},{"name":"生长光点2","parent":"point2","color":{"aM":0}},{"name":"生长光点3","parent":"point3","color":{"aM":0}},{"name":"生长光点4","parent":"point4","color":{"aM":0}},{"name":"生长光点5","parent":"point5","color":{"aM":0}},{"name":"生长光点6","parent":"point6","color":{"aM":0}},{"name":"生长光点7","parent":"point7","color":{"aM":0}},{"name":"生长光点8","parent":"point8","color":{"aM":0}},{"name":"生长光点9","parent":"point9","color":{"aM":0}},{"name":"生长光点10","parent":"point10","color":{"aM":0}}],"skin":[{"slot":[{"name":"生长光点6","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点7","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点9","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点3","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点2","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点5","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点8","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点4","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点1","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]},{"name":"生长光点10","display":[{"name":"生长光点","transform":{"x":-1019.63,"y":482.84}}]}]}],"animation":[{"duration":30,"playTimes":0,"name":"normal","bone":[{"name":"point","translateFrame":[{"duration":17,"tweenEasing":0,"x":-92,"y":175},{"duration":13,"x":-92,"y":-213}]},{"name":"point1","translateFrame":[{"duration":24,"tweenEasing":0,"x":0.5,"y":192.5},{"duration":6,"x":0.5,"y":-376.5}]},{"name":"point2","translateFrame":[{"duration":16,"tweenEasing":0,"x":-46.5,"y":165.5},{"duration":14,"x":-46.5,"y":-339.5}]},{"name":"point3","translateFrame":[{"duration":20,"tweenEasing":0,"x":-132.5,"y":193},{"duration":10,"x":-132.5,"y":-293}]},{"name":"point4","translateFrame":[{"duration":18,"tweenEasing":0,"x":56,"y":200.5},{"duration":12,"x":7.5,"y":-130}]},{"name":"point5","translateFrame":[{"duration":30,"tweenEasing":0,"x":-51,"y":153.5},{"duration":0,"x":-51,"y":-154}]},{"name":"point6","translateFrame":[{"duration":20,"tweenEasing":0,"x":-76,"y":188.5},{"duration":10,"x":-71.5,"y":-407}]},{"name":"point7","translateFrame":[{"duration":22,"tweenEasing":0,"x":27.5,"y":206},{"duration":8,"x":27.5,"y":-242.5}]},{"name":"point8","translateFrame":[{"duration":15,"tweenEasing":0,"x":-105,"y":164},{"duration":15,"x":-105,"y":-112}]},{"name":"point9","translateFrame":[{"duration":26,"tweenEasing":0,"x":-16,"y":180},{"duration":4,"x":-16,"y":-211.5}]},{"name":"point10","translateFrame":[{"duration":28,"tweenEasing":0,"x":-80.5,"y":149.5},{"duration":2,"x":-48,"y":-276.5}]}],"slot":[{"name":"生长光点","colorFrame":[{"duration":3,"tweenEasing":0,"value":{"aM":0}},{"duration":12,"tweenEasing":0},{"duration":2,"tweenEasing":0},{"duration":13,"value":{"aM":0}}]},{"name":"生长光点1","colorFrame":[{"duration":4,"tweenEasing":0,"value":{"aM":0}},{"duration":18,"tweenEasing":0},{"duration":2,"tweenEasing":0},{"duration":6,"value":{"aM":0}}]},{"name":"生长光点2","colorFrame":[{"duration":5,"tweenEasing":0,"value":{"aM":0}},{"duration":8,"tweenEasing":0},{"duration":3,"tweenEasing":0},{"duration":14,"value":{"aM":0}}]},{"name":"生长光点3","colorFrame":[{"duration":4,"tweenEasing":0,"value":{"aM":0}},{"duration":13,"tweenEasing":0},{"duration":3,"tweenEasing":0},{"duration":10,"value":{"aM":0}}]},{"name":"生长光点4","colorFrame":[{"duration":6,"tweenEasing":0,"value":{"aM":0}},{"duration":10,"tweenEasing":0},{"duration":2,"tweenEasing":0},{"duration":12,"value":{"aM":0}}]},{"name":"生长光点5","colorFrame":[{"duration":7,"tweenEasing":0,"value":{"aM":0}},{"duration":19,"tweenEasing":0},{"duration":4,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"生长光点6","colorFrame":[{"duration":6,"tweenEasing":0,"value":{"aM":0}},{"duration":11,"tweenEasing":0},{"duration":3,"tweenEasing":0},{"duration":10,"value":{"aM":0}}]},{"name":"生长光点7","colorFrame":[{"duration":3,"tweenEasing":0,"value":{"aM":0}},{"duration":16,"tweenEasing":0},{"duration":3,"tweenEasing":0},{"duration":8,"value":{"aM":0}}]},{"name":"生长光点8","colorFrame":[{"duration":2,"tweenEasing":0,"value":{"aM":0}},{"duration":10,"tweenEasing":0},{"duration":3,"tweenEasing":0},{"duration":15,"value":{"aM":0}}]},{"name":"生长光点9","colorFrame":[{"duration":4,"tweenEasing":0,"value":{"aM":0}},{"duration":19,"tweenEasing":0},{"duration":3,"tweenEasing":0},{"duration":4,"value":{"aM":0}}]},{"name":"生长光点10","colorFrame":[{"duration":5,"tweenEasing":0,"value":{"aM":0}},{"duration":20,"tweenEasing":0},{"duration":3,"tweenEasing":0},{"duration":2,"value":{"aM":0}}]}]}],"defaultActions":[{"gotoAndPlay":"normal"}],"canvas":{"width":382,"height":756}},{"type":"MovieClip","frameRate":24,"name":"MovieClip","bone":[{"name":"root"}],"defaultActions":[{}]}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "22416249-4181-453c-bf16-0ebdcc80ecc5",
"subMetas": {}
}
\ No newline at end of file
{"name":"grow","SubTexture":[{"name":"生长光点","x":1,"height":114,"y":1,"width":114}],"height":128,"imagePath":"grow_tex.png","width":128}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "3ab0524d-d211-469f-8c64-b73049400279",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "287de13d-5988-439f-b02a-eb2c6bb1402b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 128,
"height": 128,
"platformSettings": {},
"subMetas": {
"grow_tex": {
"ver": "1.0.4",
"uuid": "a9fd012d-71c6-45f9-84d3-42ae9338ab60",
"rawTextureUuid": "287de13d-5988-439f-b02a-eb2c6bb1402b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -6,
"offsetY": 6,
"trimX": 1,
"trimY": 1,
"width": 114,
"height": 114,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.0.1",
"uuid": "669b4dc6-7a03-47ee-974e-8488612ae509",
"subMetas": {}
}
\ No newline at end of file
{"name":"mao","imagePath":"mao_tex.png","SubTexture":[{"name":"猫01/影子","x":1,"height":66,"y":343,"width":337},{"name":"猫01/尾巴","x":1,"height":109,"y":188,"width":175},{"name":"猫01/右腿","x":178,"height":117,"y":188,"width":104},{"name":"猫01/左腿","x":1,"height":115,"y":569,"width":64},{"name":"猫01/右手","x":427,"height":122,"y":590,"width":69},{"name":"猫01/左手","x":301,"height":74,"y":590,"width":124},{"name":"猫01伸/左手伸直","x":299,"height":169,"y":1,"width":168},{"name":"猫01伸/右手伸直","x":299,"height":169,"y":172,"width":168},{"name":"猫01/身体","x":340,"height":180,"y":343,"width":122},{"name":"猫01/领带","x":1,"height":156,"y":411,"width":120},{"name":"猫01/右耳","x":155,"height":76,"y":602,"width":90},{"name":"猫01/左耳","x":67,"height":85,"y":602,"width":86},{"name":"猫01/组_1","x":1,"height":185,"y":1,"width":296},{"name":"猫01/右眼","x":1,"height":60,"y":686,"width":59},{"name":"猫01/右眉毛","x":67,"height":5,"y":595,"width":33},{"name":"猫01/左眼","x":247,"height":60,"y":666,"width":59},{"name":"猫01/左眉毛","x":247,"height":12,"y":602,"width":31},{"name":"猫01/眼镜","x":301,"height":63,"y":525,"width":170},{"name":"猫01/胡子","x":123,"height":85,"y":515,"width":176},{"name":"猫01/鼻子","x":67,"height":24,"y":569,"width":28},{"name":"猫01/嘴","x":1,"height":30,"y":299,"width":65},{"name":"猫01/帽子","x":123,"height":102,"y":411,"width":158}],"height":1024,"width":512}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "df8441b6-eba9-4202-a90b-67e7c89dee7b",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c5973b0e-0f71-479c-8989-06c59aeb4820",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 512,
"height": 1024,
"platformSettings": {},
"subMetas": {
"mao_tex": {
"ver": "1.0.4",
"uuid": "88c022b7-88c8-4301-aae2-880680ad6777",
"rawTextureUuid": "c5973b0e-0f71-479c-8989-06c59aeb4820",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -7.5,
"offsetY": 138.5,
"trimX": 1,
"trimY": 1,
"width": 495,
"height": 745,
"rawWidth": 512,
"rawHeight": 1024,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{"frameRate":24,"name":"vs","version":"5.5","compatibleVersion":"5.5","armature":[{"type":"Armature","frameRate":24,"name":"Armature","aabb":{"x":-296.5,"y":-297,"width":593,"height":594},"bone":[{"name":"root"},{"name":"star","parent":"root"},{"name":"vs","parent":"root"},{"name":"star1","parent":"root"},{"name":"star11","parent":"root"},{"name":"star12","parent":"root"},{"name":"star13","parent":"root"},{"name":"star14","parent":"root"},{"name":"star15","parent":"root"},{"name":"star16","parent":"root"},{"name":"star17","parent":"root"},{"name":"star18","parent":"root"},{"name":"star19","parent":"root"},{"name":"star110","parent":"root"}],"slot":[{"name":"star_01","parent":"star","color":{"aM":0}},{"name":"star_011","parent":"star1","color":{"aM":0}},{"name":"star_0111","parent":"star11","color":{"aM":0}},{"name":"star_0112","parent":"star12","color":{"aM":0}},{"name":"star_0113","parent":"star13","color":{"aM":0}},{"name":"star_0114","parent":"star14","color":{"aM":0}},{"name":"star_0115","parent":"star15","color":{"aM":0}},{"name":"star_0116","parent":"star16","color":{"aM":0}},{"name":"star_0117","parent":"star17","color":{"aM":0}},{"name":"star_0118","parent":"star18","color":{"aM":0}},{"name":"star_0119","parent":"star19","color":{"aM":0}},{"name":"star_01110","parent":"star110","color":{"aM":0}},{"name":"img_vs","parent":"vs"}],"skin":[{"slot":[{"name":"star_0115","display":[{"name":"star_01"}]},{"name":"star_0111","display":[{"name":"star_01"}]},{"name":"star_0118","display":[{"name":"star_01"}]},{"name":"star_01","display":[{"name":"star_01"}]},{"name":"star_011","display":[{"name":"star_01"}]},{"name":"img_vs","display":[{"name":"img_vs"}]},{"name":"star_0113","display":[{"name":"star_01"}]},{"name":"star_0117","display":[{"name":"star_01"}]},{"name":"star_0119","display":[{"name":"star_01"}]},{"name":"star_0116","display":[{"name":"star_01"}]},{"name":"star_01110","display":[{"name":"star_01"}]},{"name":"star_0112","display":[{"name":"star_01"}]},{"name":"star_0114","display":[{"name":"star_01"}]}]}],"animation":[{"duration":35,"playTimes":0,"name":"normal","bone":[{"name":"star","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":-293.5}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"vs","scaleFrame":[{"duration":6,"tweenEasing":0},{"duration":8,"tweenEasing":0,"x":1.47,"y":1.47},{"duration":11,"tweenEasing":0,"x":1.47,"y":1.47},{"duration":10}]},{"name":"star1","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":388.5}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"star11","translateFrame":[{"duration":20},{"duration":11,"tweenEasing":0},{"duration":4,"x":-315,"y":-153.5}],"scaleFrame":[{"duration":20},{"duration":11,"tweenEasing":0},{"duration":4,"x":-0.36,"y":-0.36}]},{"name":"star12","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":-189,"y":277}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"star13","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":-165,"y":-345.5}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"star14","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":125,"y":297}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"star15","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":129.5,"y":-340}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"star16","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":199.5,"y":247.5}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"star17","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"y":-389}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"star18","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":-32.5,"y":370.5}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"star19","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":-311.5,"y":181.5}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]},{"name":"star110","translateFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":321,"y":-202}],"scaleFrame":[{"duration":20},{"duration":15,"tweenEasing":0},{"duration":0,"x":0.01,"y":0.01}]}],"slot":[{"name":"star_01","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":5,"tweenEasing":0,"value":{"aM":0}},{"duration":10}]},{"name":"star_011","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":5,"tweenEasing":0,"value":{"aM":0}},{"duration":6,"tweenEasing":0},{"duration":4,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star_0111","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":5,"tweenEasing":0,"value":{"aM":0}},{"duration":6,"tweenEasing":0},{"duration":4,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star_0112","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":5,"tweenEasing":0,"value":{"aM":0}},{"duration":6,"tweenEasing":0},{"duration":4,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star_0113","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":5,"tweenEasing":0,"value":{"aM":0}},{"duration":6,"tweenEasing":0},{"duration":4,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star_0114","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":5,"tweenEasing":0,"value":{"aM":0}},{"duration":10}]},{"name":"star_0115","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":5,"tweenEasing":0,"value":{"aM":0}},{"duration":10}]},{"name":"star_0116","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":6,"tweenEasing":0,"value":{"aM":0}},{"duration":9}]},{"name":"star_0117","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":6,"tweenEasing":0,"value":{"aM":0}},{"duration":9}]},{"name":"star_0118","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":6,"tweenEasing":0,"value":{"aM":0}},{"duration":9}]},{"name":"star_0119","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":6,"tweenEasing":0,"value":{"aM":0}},{"duration":5,"tweenEasing":0},{"duration":4,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star_01110","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":6,"tweenEasing":0,"value":{"aM":0}},{"duration":5,"tweenEasing":0},{"duration":4,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]}],"zOrder":{"frame":[{"duration":35}]}}],"defaultActions":[{"gotoAndPlay":"normal"}],"canvas":{"width":1024,"height":1024}},{"type":"MovieClip","frameRate":24,"name":"MovieClip","bone":[{"name":"root"}],"defaultActions":[{}]}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "cfe391eb-471c-4cdb-af6c-42a6557d2695",
"subMetas": {}
}
\ No newline at end of file
{"name":"vs","SubTexture":[{"name":"star_01","x":1,"height":169,"y":597,"width":174},{"name":"img_vs","x":1,"height":594,"y":1,"width":593}],"height":1024,"imagePath":"vs_tex.png","width":1024}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "d4b612e2-59f2-4ca4-834b-7523de1cb48b",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "18fbab5d-b452-4696-a57b-2c176053ea6c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 1024,
"platformSettings": {},
"subMetas": {
"vs_tex": {
"ver": "1.0.4",
"uuid": "eca3d7f9-d3b0-4324-b576-c053793b5f67",
"rawTextureUuid": "18fbab5d-b452-4696-a57b-2c176053ea6c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -214.5,
"offsetY": 128.5,
"trimX": 1,
"trimY": 1,
"width": 593,
"height": 765,
"rawWidth": 1024,
"rawHeight": 1024,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "20185448-a1ca-4de2-8b37-7bf6cdfccbae",
"uuid": "9ff8f690-b49c-4fd9-9e23-96995d20e59c",
"isBundle": false,
"bundleName": "",
"priority": 1,
......
{
"ver": "1.1.0",
"uuid": "c551970e-b095-45f3-9f1d-25cde8b8deb1",
"uuid": "9d124dc6-23b6-450d-9ce2-f0c49256409f",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "144d8eb1-a6fd-4853-905d-5ba9eaaf3e9a",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
export as namespace Play;
declare class EventEmitter<T> {
on<K extends keyof T>(event: K, listener: (payload: T[K]) => any): this;
on(evt: string, listener: Function): this;
once<K extends keyof T>(event: K, listener: (payload: T[K]) => any): this;
once(evt: string, listener: Function): this;
off<K extends keyof T>(evt: K | string, listener?: Function): this;
emit<K extends keyof T>(evt: K | string, ...args: any[]): boolean;
}
export enum Event {
/** 断开连接 */
DISCONNECTED = 'disconnected',
/** 加入到大厅 */
LOBBY_JOINED = 'lobbyJoined',
/** 大厅房间列表变化 */
LOBBY_ROOM_LIST_UPDATED = 'lobbyRoomListUpdate',
/** 有新玩家加入房间 */
PLAYER_ROOM_JOINED = 'newPlayerJoinedRoom',
/** 有玩家离开房间 */
PLAYER_ROOM_LEFT = 'playerLeftRoom',
/** 玩家活跃属性变化 */
PLAYER_ACTIVITY_CHANGED = 'playerActivityChanged',
/** 主机变更 */
MASTER_SWITCHED = 'masterSwitched',
/** 离开房间 */
ROOM_LEFT = 'roomLeft',
/** 被踢出房间 */
ROOM_KICKED = 'roomKicked',
/** 房间系统属性变化 */
ROOM_SYSTEM_PROPERTIES_CHANGED = 'roomSystemPropertiesChanged',
/** 房间自定义属性变化 */
ROOM_CUSTOM_PROPERTIES_CHANGED = 'roomCustomPropertiesChanged',
/** 玩家自定义属性变化 */
PLAYER_CUSTOM_PROPERTIES_CHANGED = 'playerCustomPropertiesChanged',
/** 自定义事件 */
CUSTOM_EVENT = 'customEvent',
/** 错误事件 */
ERROR = 'error',
}
export enum ReceiverGroup {
/** 其他人(除了自己之外的所有人) */
Others,
/** 所有人(包括自己) */
All,
/** 主机客户端 */
MasterClient,
}
interface CustomProperties {
[key: string]: any;
}
interface CustomEventData {
[key: string]: any;
}
interface ErrorEvent {
code: number;
detail: string;
}
declare interface PlayEvent {
connected: void;
connectFailed: ErrorEvent;
disconnected: void;
lobbyJoined: void;
lobbyLeft: void;
lobbyRoomListUpdate: void;
roomCreated: void;
roomCreateFailed: ErrorEvent;
roomJoined: void;
roomJoinFailed: ErrorEvent;
newPlayerJoinedRoom: {
newPlayer: Player;
};
playerLeftRoom: {
leftPlayer: Player;
};
playerActivityChanged: {
player: Player;
};
masterSwitched: {
newMaster: Player;
};
roomLeft: void;
roomKicked: {
code: number;
msg: string;
};
roomCustomPropertiesChanged: {
changedProps: CustomProperties;
};
roomSystemPropertiesChanged: {
changedProps: CustomProperties;
};
playerCustomPropertiesChanged: {
player: Player;
changedProps: CustomProperties;
};
customEvent: {
eventId: number;
eventData: CustomEventData;
senderId: number;
};
error: ErrorEvent;
}
export class LobbyRoom {
readonly roomName: string;
readonly maxPlayerCount: number;
readonly expectedUserIds: string[];
readonly emptyRoomTtl: number;
readonly playerTtl: number;
readonly playerCount: number;
readonly customRoomPropertiesForLobby: CustomProperties;
}
export class Player {
readonly userId: string;
readonly actorId: number;
readonly isLocal: boolean;
readonly isMaster: boolean;
readonly isActive: boolean;
setCustomProperties(
properties: CustomProperties,
opts?: {
expectedValues?: CustomProperties;
}
): Promise<void>;
readonly customProperties: CustomProperties;
}
export class Room {
readonly name: string;
readonly open: boolean;
readonly visible: boolean;
readonly maxPlayerCount: number;
readonly master: Player;
readonly masterId: number;
readonly expectedUserIds: string[];
readonly playerList: Player[];
getPlayer(actorId: number): Player;
setCustomProperties(
properties: CustomProperties,
opts?: {
expectedValues?: CustomProperties;
}
): Promise<void>;
readonly customProperties: CustomProperties;
setOpen(open: boolean): Promise<void>;
setVisible(visible: boolean): Promise<void>;
setRoomMaxPlayerCount(count: number): Promise<void>;
setRoomExpectedUserIds(expectedUserIds: string[]): Promise<void>;
clearRoomExpectedUserIds(): Promise<void>;
addRoomExpectedUserIds(expectedUserIds: string[]): Promise<void>;
removeRoomExpectedUserIds(expectedUserIds: string[]): Promise<void>;
setMaster(newMasterId: number): Promise<void>;
sendEvent(
eventId: number,
eventData?: CustomEventData,
options?: {
receiverGroup?: ReceiverGroup;
targetActorIds?: number[];
}
): Promise<void>;
kickPlayer(
actorId: number,
opts?: {
code?: number;
msg?: string;
}
): Promise<void>;
leave(): Promise<void>;
}
export class Client extends EventEmitter<PlayEvent> {
readonly room: Room;
readonly player: Player;
readonly lobbyRoomList: LobbyRoom[];
userId: string;
constructor(opts: {
appId: string;
appKey: string;
userId: string;
ssl?: boolean;
feature?: string;
gameVersion?: string;
playServer?: string;
});
connect(): Promise<Client>;
reconnect(): Promise<Client>;
reconnectAndRejoin(): Promise<Room>;
close(): Promise<void>;
joinLobby(): Promise<void>;
leaveLobby(): Promise<void>;
createRoom(opts?: {
roomName?: string;
roomOptions?: Object;
expectedUserIds?: string[];
}): Promise<Room>;
joinRoom(
roomName: string,
opts?: {
expectedUserIds?: string[];
}
): Promise<Room>;
rejoinRoom(roomName: string): Promise<Room>;
joinOrCreateRoom(
roomName: string,
opts?: {
roomOptions?: Object;
expectedUserIds: string[];
}
): Promise<Room>;
joinRandomRoom(opts?: {
matchProperties?: Object;
expectedUserIds?: string[];
}): Promise<Room>;
matchRandom(
piggybackPeerId: string,
opts?: { matchProperties?: Object; expectedUserIds?: string[] }
): Promise<LobbyRoom>;
setRoomOpen(open: boolean): Promise<void>;
setRoomVisible(visible: boolean): Promise<void>;
setRoomMaxPlayerCount(count: number): Promise<void>;
setRoomExpectedUserIds(expectedUserIds: string[]): Promise<void>;
clearRoomExpectedUserIds(): Promise<void>;
addRoomExpectedUserIds(expectedUserIds: string[]): Promise<void>;
removeRoomExpectedUserIds(expectedUserIds: string[]): Promise<void>;
setMaster(newMasterId: number): Promise<void>;
sendEvent(
eventId: number,
eventData?: CustomEventData,
options?: {
receiverGroup?: ReceiverGroup;
targetActorIds?: number[];
}
): Promise<void>;
leaveRoom(): Promise<void>;
kickPlayer(
actorId: number,
opts?: {
code?: number;
msg?: string;
}
): Promise<void>;
pauseMessageQueue(): void;
resumeMessageQueue(): void;
}
export enum CreateRoomFlag {
FixedMaster = 1,
MasterUpdateRoomProperties = 2,
}
export function setAdapters(newAdapters: { WebSocket: Function }): void;
export enum LogLevel {
Debug = 'Debug',
Warn = 'Warn',
Error = 'Error',
}
export function setLogger(logger: {
Debug: (...args: any[]) => any;
Warn: (...args: any[]) => any;
Error: (...args: any[]) => any;
}): void;
export enum PlayErrorCode {
OPEN_WEBSOCKET_ERROR = 10001,
SEND_MESSAGE_STATE_ERROR = 10002,
}
export function registerType<T>(
type: T,
typeId: number,
serializeMethod: (obj: T) => Uint8Array,
deserializeMethod: (bytes: Uint8Array) => T
): void;
export function serializeObject(obj: Object): Uint8Array;
export function deserializeObject(bytes: Uint8Array): Object;
{
"ver": "2.0.0",
"uuid": "1505b076-66a3-4cf1-a0df-71aae58788a0",
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "b54300af-b8e5-4b4e-aa2f-9ac1cef7b598",
"uuid": "cfa7cdc2-c0ee-4c9c-a7c3-7f0ecfbd1fe3",
"isPlugin": true,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"loadPluginInEditor": true,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "c4efa419-ac4c-425f-913d-d59d87bcacd5",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "8a51fa6d-5483-4f99-ac79-d20a308f07c8",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "3f008425-b43a-486c-9504-33b637883127",
"optimizationPolicy": "SINGLE_INSTANCE",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "55ea830c-65b9-4a9c-a492-e789b787c9c3",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "e3aca1fc-d31d-41a7-903a-d8fdf7573a2b",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "cee455f1-0288-4bf3-a2b9-0b58cf26850c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 366,
"height": 336,
"width": 2176,
"height": 1600,
"platformSettings": {},
"subMetas": {
"1orange": {
"bg": {
"ver": "1.0.4",
"uuid": "43d1e79d-6de8-4dcb-b8ce-d767df7913aa",
"rawTextureUuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "3348977e-8702-4b5e-9cb5-7b2c7df49fa4",
"rawTextureUuid": "cee455f1-0288-4bf3-a2b9-0b58cf26850c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"offsetY": 0,
"trimX": 0,
"trimY": 1,
"width": 366,
"height": 335,
"rawWidth": 366,
"rawHeight": 336,
"trimY": 0,
"width": 2176,
"height": 1600,
"rawWidth": 2176,
"rawHeight": 1600,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "1.1.0",
"uuid": "e8b88158-fc26-4724-b082-62771920ccf4",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c2eb6841-e93d-4e49-a2cc-1a2fd1fd0786",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "point",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1568,
"height": 32,
"platformSettings": {},
"subMetas": {
"progress_bar": {
"ver": "1.0.4",
"uuid": "65b86b52-ca5a-4e89-a87d-1e31a1e8b123",
"rawTextureUuid": "c2eb6841-e93d-4e49-a2cc-1a2fd1fd0786",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1568,
"height": 32,
"rawWidth": 1568,
"rawHeight": 32,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "dd81caa9-f935-4589-9ca8-c02726259803",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "point",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1578,
"height": 42,
"platformSettings": {},
"subMetas": {
"progress_bg": {
"ver": "1.0.4",
"uuid": "742c33d7-9358-4bf2-93bc-d6ff51e967c2",
"rawTextureUuid": "dd81caa9-f935-4589-9ca8-c02726259803",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1578,
"height": 42,
"rawWidth": 1578,
"rawHeight": 42,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "bbea7681-18d0-43a6-81f2-1d2a6ad49fb4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 280,
"height": 280,
"platformSettings": {},
"subMetas": {
"tx_01": {
"ver": "1.0.4",
"uuid": "2660f78d-42c9-427e-a0cc-6012bac4588e",
"rawTextureUuid": "bbea7681-18d0-43a6-81f2-1d2a6ad49fb4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 280,
"height": 280,
"rawWidth": 280,
"rawHeight": 280,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "061018f1-cb26-4ceb-a2f0-8413729b0978",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 258,
"height": 258,
"platformSettings": {},
"subMetas": {
"tx_01zw": {
"ver": "1.0.4",
"uuid": "5c0145b5-16e4-4428-a1c3-0fad018fbfac",
"rawTextureUuid": "061018f1-cb26-4ceb-a2f0-8413729b0978",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 258,
"height": 258,
"rawWidth": 258,
"rawHeight": 258,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "8683b41f-b9f4-4cd5-b0d5-156954451a5c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 388,
"height": 388,
"platformSettings": {},
"subMetas": {
"tx_xuanzhong": {
"ver": "1.0.4",
"uuid": "23836427-abee-459a-ae4e-fb0cc693dfbd",
"rawTextureUuid": "8683b41f-b9f4-4cd5-b0d5-156954451a5c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 388,
"height": 388,
"rawWidth": 388,
"rawHeight": 388,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "054b4ba3-51b0-4968-a19a-8bfb27dbab7e",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
cc.Class({
extends: cc.Component,
properties: {
},
start() {
const BtnExit = cc.find('BtnFrame/BtnExit', this.node);
this.buttonOnClick(BtnExit, () => {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
if (middleLayerComponent.onClickExitBtn) {
middleLayerComponent.onClickExitBtn();
}
} else {
cc.director.getScene().destroy();
cc.audioEngine.stopAll();
if (window.courseware) {
window.courseware.freeAllOcMethod();
}
var bundle = cc.assetManager.bundles.find((obj) => {
return obj.getSceneInfo('debug_shell');
});
if (bundle) {
cc.director.loadScene("debug_shell", null, null, (err, scene) => { });
} else {
cc.director.loadScene("OXFORDCORE", null, null, (err, scene) => { });
}
}
});
const BtnPlayAgain = cc.find('BtnFrame/BtnPlayAgain', this.node);
this.buttonOnClick(BtnPlayAgain, () => {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
if (middleLayerComponent) {
middleLayerComponent.reloadBundle();
}
} else {
const sceneName = cc.director.getScene().name;
cc.director.getScene().destroy();
cc.audioEngine.stopAll();
if (window.courseware) {
window.courseware.freeAllOcMethod();
}
cc.director.loadScene(sceneName, null, null, (err, scene) => { });
}
});
},
buttonOnClick(button, callback, scale = 1.0) {
button.on('click', () => {
if (button['cantClick']) {
return;
}
button['cantClick'] = true;
cc.tween(button)
.to(0.1, { scale: scale * 1.1 })
.to(0.1, { scale: scale })
.call(() => {
button['cantClick'] = false;
callback && callback();
})
.start();
});
}
});
{
"ver": "1.0.8",
"uuid": "408a67f8-65fa-4cf1-8cf2-83e20e1a0fd5",
"uuid": "f4c83ae7-1942-4ef7-84c2-e9c5bb232676",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
{
"ver": "1.2.9",
"uuid": "8531c3cc-2785-4481-8215-5286c62232b9",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "8ba21262-178f-4fa5-afc9-2c1dd50ba3ab",
"uuid": "c510a3b7-b1cb-4d24-be4d-e64a89013b1b",
"isBundle": false,
"bundleName": "",
"priority": 1,
......
{
"ver": "2.3.5",
"uuid": "d04f0fd7-4b30-472f-a84e-db6bcfe5fbf1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 158,
"height": 60,
"platformSettings": {},
"subMetas": {
"BtnExit": {
"ver": "1.0.4",
"uuid": "86b28aed-c015-429e-b692-07d9ebe70199",
"rawTextureUuid": "d04f0fd7-4b30-472f-a84e-db6bcfe5fbf1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 158,
"height": 60,
"rawWidth": 158,
"rawHeight": 60,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "e8bd16b0-3804-45a9-a8ca-f52c02224f55",
"uuid": "8ac4d010-715c-4c05-b712-180f6073b43b",
"isBundle": false,
"bundleName": "",
"priority": 1,
......
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const { ccclass, property } = cc._decorator;
@ccclass
export default class L2_BoardGame2_snow_ItemData extends cc.Component {
@property
letter: string = '';
@property
idx: string = '';
@property
word: string = '';
@property
jump: string = ''
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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 to comment