Commit 703bfb92 authored by jeff's avatar jeff

修复bug

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