Commit 40b78b58 authored by Lwd's avatar Lwd

commit

parent 9710af92
...@@ -131,6 +131,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -131,6 +131,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
} }
addSheep() { addSheep() {
if (this.item.sheepArr.length >= 30) {
return
}
let sheep = new Sheep(); let sheep = new Sheep();
this.item.sheepArr.push(sheep); this.item.sheepArr.push(sheep);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
cc.Class({ cc.Class({
extends: cc.Component, extends: cc.Component,
properties: { properties: {
setAnswerId: { setAnswerId: {
default: "", default: "",
displayName: "类型ID" displayName: "类型ID"
}, },
labTitle: { labTitle: {
default: null, default: null,
type: cc.Label, type: cc.Label,
displayName: "标题" displayName: "标题"
}, },
}, },
onLoad() { onLoad() {
this.labTitle.string = g.data_mgr.getSheepfold(this.setAnswerId).word; this.labTitle.string = g.data_mgr.getSheepfold(this.setAnswerId).word;
this.Event(); this.Event();
}, },
Event() { Event() {
this.m_uuid = g.utils.generateUUID(); //生成一个唯一Id this.m_uuid = g.utils.generateUUID(); //生成一个唯一Id
g.event_mgr.reg("reSetGame", () => { g.event_mgr.reg("reSetGame", () => {
this.node.getChildByName("Layout").removeAllChildren() this.node.getChildByName("scrollView").getChildByName("view").getChildByName("content").removeAllChildren();
}, this.m_uuid); }, this.m_uuid);
}, },
start() { start() {
}, },
setAABB() { setAABB() {
var node = this.node var node = this.node
let svLeftBottomPoint = node.parent.convertToWorldSpaceAR( let svLeftBottomPoint = node.parent.convertToWorldSpaceAR(
cc.v2( cc.v2(
node.x - node.width / 2, node.x - node.width / 2,
node.y - node.height / 2, node.y - node.height / 2,
) )
); );
console.log("世界坐标目标点" + svLeftBottomPoint); console.log("世界坐标目标点" + svLeftBottomPoint);
// 求出 ScrollView 可视区域在世界坐标系中的矩形(碰撞盒) // 求出 ScrollView 可视区域在世界坐标系中的矩形(碰撞盒)
let svBBoxRect = cc.rect( let svBBoxRect = cc.rect(
svLeftBottomPoint.x, svLeftBottomPoint.x,
svLeftBottomPoint.y, svLeftBottomPoint.y,
node.width, node.width,
node.height node.height
); );
// console.log(Id + ":" + svLeftBottomPoint.x + "," + svLeftBottomPoint.y); // console.log(Id + ":" + svLeftBottomPoint.x + "," + svLeftBottomPoint.y);
return svBBoxRect return svBBoxRect
}, },
}); });
...@@ -104,8 +104,13 @@ cc.Class({ ...@@ -104,8 +104,13 @@ cc.Class({
this.node.scale = 0.6; this.node.scale = 0.6;
this.node.x = 0; this.node.x = 0;
} }
if (g.game.inst.OptionType == 2) {
this.node.scale = this.node.scale * 0.8;
}
this.node.parent = newItem_temp; this.node.parent = newItem_temp;
newItem_temp.parent = content.getChildByName("Layout");
newItem_temp.parent = content.getChildByName("scrollView").getChildByName("view").getChildByName("content");
this.node.x = 0; this.node.x = 0;
this.node.y = 0; this.node.y = 0;
}, },
...@@ -181,6 +186,7 @@ cc.Class({ ...@@ -181,6 +186,7 @@ cc.Class({
InitData: function () { InitData: function () {
//设置图片 //设置图片
g.res_mgr.getSpriteFrimeByUrl(this.itemInfo.picUrl, (list) => { g.res_mgr.getSpriteFrimeByUrl(this.itemInfo.picUrl, (list) => {
this.Item_photo.getComponent(cc.Sprite).spriteFrame = list; this.Item_photo.getComponent(cc.Sprite).spriteFrame = list;
this.photoScare(this.Item_photo, g.game.inst.idx); this.photoScare(this.Item_photo, g.game.inst.idx);
// this.photoScare(this.nodeState[2].getChildByName("spt_item"), 1); // this.photoScare(this.nodeState[2].getChildByName("spt_item"), 1);
......
...@@ -14,14 +14,41 @@ g.data_mgr = { ...@@ -14,14 +14,41 @@ g.data_mgr = {
{ "id": "1623738000162o9u566", "word": "标题2" }, { "id": "1623738000162o9u566", "word": "标题2" },
{ "id": "3", "word": "标题3" }, { "id": "3", "word": "标题3" },
{ "id": "4", "word": "标题4" }, { "id": "4", "word": "标题4" },
{ "id": "4", "word": "标题4" } // { "id": "4", "word": "标题4" },
// { "id": "4", "word": "标题4" }
], ],
"sheepArr": [ "sheepArr": [
{ "sheepfoldId": "162373800016117r8ti", "word": "aaa", "picUrl": "http://staging-teach.cdn.ireadabc.com/77d34b5a7f2895e9319d4485a84a1b2b.png" }, { "sheepfoldId": "162373800016117r8ti", "word": "aaa", "picUrl": "http://staging-teach.cdn.ireadabc.com/77d34b5a7f2895e9319d4485a84a1b2b.png" },
{ "word": "aa", "sheepfoldId": "1623738000162o9u566", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" }, { "word": "aa", "sheepfoldId": "1623738000162o9u566", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "12", "sheepfoldId": "4", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" }, { "word": "12", "sheepfoldId": "4", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" }, { "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "word": "3", "sheepfoldId": "3", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png" },
{ "sheepfoldId": "1623738000162o9u566", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png", "word": "fgsdfg" }, { "sheepfoldId": "1623738000162o9u566", "picUrl": "http://staging-teach.cdn.ireadabc.com/be3debcc0598cfdde8a9e1ad2324743e.png", "word": "fgsdfg" },
{ "sheepfoldId": "162373800016117r8ti", "picUrl": "http://staging-teach.cdn.ireadabc.com/77d34b5a7f2895e9319d4485a84a1b2b.png", "word": "gdfa" }], { "sheepfoldId": "162373800016117r8ti", "picUrl": "http://staging-teach.cdn.ireadabc.com/77d34b5a7f2895e9319d4485a84a1b2b.png", "word": "gdfa" }],
......
{
"ver": "2.3.5",
"uuid": "83cc39f1-470e-4998-b852-701abdddc27e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 177,
"height": 160,
"platformSettings": {},
"subMetas": {
"11": {
"ver": "1.0.4",
"uuid": "508485c4-9bbc-4fe0-8f25-b320fad59967",
"rawTextureUuid": "83cc39f1-470e-4998-b852-701abdddc27e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 4,
"offsetY": 4,
"trimX": 43,
"trimY": 12,
"width": 99,
"height": 128,
"rawWidth": 177,
"rawHeight": 160,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 1280, "width": 1280,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 1280, "width": 1280,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 376, "width": 376,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 279, "width": 279,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 218, "width": 218,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 178, "width": 178,
......
play/assets/ET26/textures/item_bg2.png

8.13 KB | W: | H:

play/assets/ET26/textures/item_bg2.png

3.49 KB | W: | H:

play/assets/ET26/textures/item_bg2.png
play/assets/ET26/textures/item_bg2.png
play/assets/ET26/textures/item_bg2.png
play/assets/ET26/textures/item_bg2.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 154, "width": 120,
"height": 86, "height": 63,
"rawWidth": 154, "rawWidth": 120,
"rawHeight": 86, "rawHeight": 63,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "4f778c67-bd48-4376-9378-cb16739258db", "uuid": "1b56c0a8-0cc2-4534-a598-429d068bbcb7",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 1280, "width": 5,
"height": 720, "height": 233,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"3": { "jdt_01": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "23e0b0fe-51e8-4468-8f63-be136f646dc0", "uuid": "c7aa283e-88af-4cc2-ab52-ff4c167de85f",
"rawTextureUuid": "4f778c67-bd48-4376-9378-cb16739258db", "rawTextureUuid": "1b56c0a8-0cc2-4534-a598-429d068bbcb7",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 1280, "width": 5,
"height": 720, "height": 233,
"rawWidth": 1280, "rawWidth": 5,
"rawHeight": 720, "rawHeight": 233,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "e4022990-5815-43d9-86a7-6b00a83fbdab",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 11,
"height": 13,
"platformSettings": {},
"subMetas": {
"jdt_02": {
"ver": "1.0.4",
"uuid": "6903c246-a3a4-4391-b73e-e6c4b4ebd4bf",
"rawTextureUuid": "e4022990-5815-43d9-86a7-6b00a83fbdab",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 11,
"height": 13,
"rawWidth": 11,
"rawHeight": 13,
"borderTop": 5,
"borderBottom": 7,
"borderLeft": 4,
"borderRight": 4,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 658, "width": 658,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 113, "width": 113,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 314, "width": 314,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 251, "width": 251,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 290, "width": 290,
......
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