Commit 703bfb92 authored by jeff's avatar jeff

修复bug

parent 52ebafda
...@@ -304,12 +304,12 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges { ...@@ -304,12 +304,12 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
item.y = this.canvasHeight / 2; item.y = this.canvasHeight / 2;
item.itemType = this.getDefaultItemType(); item.itemType = this.getDefaultItemType();
item.gIdx = 0 item.gIdx = '0'
item['id'] = new Date().getTime().toString(); item['id'] = new Date().getTime().toString();
item['data'] = saveData; item['data'] = saveData;
item['useHand'] = true item['useHand'] = true
item['useBorder'] =true item['useBorder'] = true
console.log('item.x: ', item.x); console.log('item.x: ', item.x);
if (saveData) { if (saveData) {
...@@ -323,7 +323,7 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges { ...@@ -323,7 +323,7 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
item['id'] = saveData.id; item['id'] = saveData.id;
item['pic'] = saveData.pic_url item['pic'] = saveData.pic_url
// item['skeJsonData'] = saveData.skeJsonData; // item['skeJsonData'] = saveData.skeJsonData;
// item['texJsonData'] = saveData.texJsonData; // item['texJsonData'] = saveData.texJsonData;
// item['texPngData'] = saveData.texPngData; // item['texPngData'] = saveData.texPngData;
...@@ -1087,8 +1087,8 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges { ...@@ -1087,8 +1087,8 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
} }
/** 改变内容 */ /** 改变内容 */
onChangeSwitch(data,name:string){ onChangeSwitch(data, name: string) {
data[name] =!data[name] data[name] = !data[name]
} }
getSendData() { getSendData() {
......
...@@ -275,8 +275,8 @@ ...@@ -275,8 +275,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 391, "width": 397,
"height": 133 "height": 139
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -355,10 +355,10 @@ ...@@ -355,10 +355,10 @@
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 45, "_alignFlags": 45,
"_left": -20, "_left": -23,
"_right": -20, "_right": -23,
"_top": -20, "_top": -23,
"_bottom": -20, "_bottom": -23,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
...@@ -854,6 +854,9 @@ ...@@ -854,6 +854,9 @@
"sprite": { "sprite": {
"__id__": 12 "__id__": 12
}, },
"tipClip": {
"__uuid__": "e0bcf4cc-35a7-4d61-b202-8dd49299c2c0"
},
"_id": "" "_id": ""
}, },
{ {
......
...@@ -8,7 +8,8 @@ cc.Class({ ...@@ -8,7 +8,8 @@ cc.Class({
quan: cc.Node, quan: cc.Node,
tipsAnim: cc.Animation, tipsAnim: cc.Animation,
handAnim: cc.Animation, handAnim: cc.Animation,
sprite: cc.Sprite sprite: cc.Sprite,
tipClip: cc.AudioClip
}, },
data: null, data: null,
...@@ -70,7 +71,7 @@ cc.Class({ ...@@ -70,7 +71,7 @@ cc.Class({
} }
this.handAnim.stop() this.handAnim.stop()
this.handAnim.node.active = false this.handAnim.node.active = false
cc.audioEngine.play(this.tipClip)
} }
}, },
...@@ -91,7 +92,6 @@ cc.Class({ ...@@ -91,7 +92,6 @@ cc.Class({
this.quan.active = false this.quan.active = false
this.tipsAnim.stop() this.tipsAnim.stop()
this.tipsAnim.node.active = false this.tipsAnim.node.active = false
this.sprite.node.active = false
if (this.data.useHand) { if (this.data.useHand) {
this.handAnim.node.active = true this.handAnim.node.active = true
this.handAnim.play() this.handAnim.play()
......
...@@ -20,8 +20,7 @@ cc.Class({ ...@@ -20,8 +20,7 @@ cc.Class({
type: cc.Node, type: cc.Node,
default: null default: null
}, },
btnClip: cc.AudioClip, btnClip: cc.AudioClip
tipClip: cc.AudioClip,
}, },
// 生命周期 onLoad // 生命周期 onLoad
...@@ -193,7 +192,7 @@ cc.Class({ ...@@ -193,7 +192,7 @@ cc.Class({
this.leftMove() this.leftMove()
cc.audioEngine.play(this.clickClip, false, 0.5) cc.audioEngine.play(this.btnClip, false, 0.5)
}, },
onClickLeft() { onClickLeft() {
...@@ -211,7 +210,7 @@ cc.Class({ ...@@ -211,7 +210,7 @@ cc.Class({
} }
this.rightMove() this.rightMove()
cc.audioEngine.play(this.clickClip, false, 0.8) cc.audioEngine.play(this.btnClip, false, 0.8)
}, },
......
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