Commit 454ec561 authored by yu's avatar yu

1

parent 11da389a
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
"ver": "2.0.1", "ver": "2.0.1",
"uuid": "3732de27-2694-4f6c-9792-666538fc1d94", "uuid": "3732de27-2694-4f6c-9792-666538fc1d94",
"downloadMode": 0, "downloadMode": 0,
"duration": 2.220417, "duration": 1.38449,
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
...@@ -131,7 +131,7 @@ export default class Game { ...@@ -131,7 +131,7 @@ export default class Game {
public pointsArr; public pointsArr;
public changepoints(wh: any) { public changepoints(wh: any) {
let data = this.data; let data = this.data;
if (wh.w > 1150) { if (wh.w > 1300) {
imageZize.width = 1150; imageZize.width = 1150;
let sx = imageZize.width / wh.w; let sx = imageZize.width / wh.w;
imageZize.height = wh.h * sx; imageZize.height = wh.h * sx;
......
This diff is collapsed.
...@@ -40,6 +40,9 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -40,6 +40,9 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
@property(cc.Node) @property(cc.Node)
item: cc.Node = null; item: cc.Node = null;
@property(cc.Node)
item_op: cc.Node = null;
private initListener() { private initListener() {
...@@ -93,6 +96,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -93,6 +96,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
itembg.width = imageZize.width; itembg.width = imageZize.width;
itembg.height = imageZize.height; itembg.height = imageZize.height;
this.creaetPosPic(); this.creaetPosPic();
itembg.x = -itembg.width / 2;
}); });
this.createCrads(); this.createCrads();
} }
...@@ -143,9 +147,18 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -143,9 +147,18 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
this.layout_op.removeAllChildren();
let op = Game.getIns().opdata; let op = Game.getIns().opdata;
let item = cc.instantiate(this.item_op);
op.forEach((dt, idx) => { op.forEach((dt, idx) => {
let ch = this.layout_op.children[idx]; if (idx % 8 == 0) {
item = cc.instantiate(this.item_op);
item.active = true;
item.parent = this.layout_op;
}
let id = idx % 8;
let ch = item.children[id];
this.log(id)
if (!ch) return; if (!ch) return;
ch.active = true; ch.active = true;
let desc = cc.find("desc", ch); let desc = cc.find("desc", ch);
...@@ -258,7 +271,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent { ...@@ -258,7 +271,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
// let dis = this.getDistances(target.getPosition(), bg.getPosition()); // let dis = this.getDistances(target.getPosition(), bg.getPosition());
let dis = this.getDistances(target, bg); let dis = this.getDistances(target, bg);
// if (dis < 100 && bg.sortId == data.id) { // if (dis < 100 && bg.sortId == data.id) {
if (dis < 100) { if (dis < 100 && bg.data.text == data.text) {
return bg; return bg;
} }
return null; return null;
......
...@@ -142,6 +142,32 @@ export const defaultData = { ...@@ -142,6 +142,32 @@ export const defaultData = {
"y": 362.59 "y": 362.59
} }
}, },
{
"id": "1689340909231",
"index": 5,
"text": "ox",
"audio_url": "http://teach.cdn.ireadabc.com/be05161de62ae50ce79f4dca0f8cb0f6_l.mp3",
"itemType": "text",
"fontScale": 0.7046875,
"imgScale": 1,
"imgSizeW": 0,
"imgSizeH": 0,
"mapScale": 0.7046875,
"dragDot": {
"x": 451,
"y": 190
},
"gIdx": "0",
"fontSize": 50,
"fontName": "ahronbd-1",
"ontColor": "#8f3758",
"rect": {
"width": 38.58,
"height": 35.23,
"x": 134.17,
"y": 451.11
}
},
{ {
"id": "1689340915577", "id": "1689340915577",
"index": 6, "index": 6,
...@@ -220,9 +246,88 @@ export const defaultData = { ...@@ -220,9 +246,88 @@ export const defaultData = {
"y": 193.48 "y": 193.48
} }
}, },
{
"id": "1689340940251",
"index": 9,
"text": "dragon",
"audio_url": "http://teach.cdn.ireadabc.com/a835e6f9c863dcedbcc582a8bb650233_l.mp3",
"itemType": "text",
"fontScale": 0.7046875,
"imgScale": 1,
"imgSizeW": 0,
"imgSizeH": 0,
"mapScale": 0.7046875,
"dragDot": {
"x": 451,
"y": 190
},
"gIdx": "0",
"fontSize": 50,
"fontName": "ahronbd-1",
"ontColor": "#8f3758",
"rect": {
"width": 114.36,
"height": 35.23,
"x": 595.99,
"y": 281.32
}
},
{
"id": "1689340948390",
"index": 10,
"text": "rabbit",
"audio_url": "http://teach.cdn.ireadabc.com/c727e329a390e810f262b2b2baca481d_l.mp3",
"itemType": "text",
"fontScale": 0.7046875,
"imgScale": 1,
"imgSizeW": 0,
"imgSizeH": 0,
"mapScale": 0.7046875,
"dragDot": {
"x": 451,
"y": 190
},
"gIdx": "0",
"fontSize": 50,
"fontName": "ahronbd-1",
"ontColor": "#8f3758",
"rect": {
"width": 95.37,
"height": 35.23,
"x": 611.23,
"y": 366.88
}
},
{
"id": "1689340965671",
"index": 11,
"text": "tiger",
"audio_url": "http://teach.cdn.ireadabc.com/19802431d0d48cf492591c4a2388c76a_l.mp3",
"itemType": "text",
"fontScale": 0.7046875,
"imgScale": 1,
"imgSizeW": 0,
"imgSizeH": 0,
"mapScale": 0.7046875,
"dragDot": {
"x": 451,
"y": 190
},
"gIdx": "0",
"fontSize": 50,
"fontName": "ahronbd-1",
"ontColor": "#8f3758",
"rect": {
"width": 74.76,
"height": 35.23,
"x": 603.26,
"y": 452.38
}
}
], ],
"npcTitle": "Mind Map", "npcTitle": "Mind Map",
"npcAudio": "http://teach.cdn.ireadabc.com/840c5d814e82b8dbc869d7523d592869_l.mp3", "npcAudio": "",
// "npcAudio": "http://teach.cdn.ireadabc.com/840c5d814e82b8dbc869d7523d592869_l.mp3",
"npcAudioName": "HY14位置匹配-将单词拖动到正确的位置.mp3", "npcAudioName": "HY14位置匹配-将单词拖动到正确的位置.mp3",
"questionText": "" "questionText": ""
} }
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2ecdb066-ae76-41fc-a802-dddcc9605463",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 1080,
"platformSettings": {},
"subMetas": {
"bgb": {
"ver": "1.0.4",
"uuid": "43e0afbc-174b-46a2-9af0-21a50c77b965",
"rawTextureUuid": "2ecdb066-ae76-41fc-a802-dddcc9605463",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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