Commit 1b865310 authored by 范雪寒's avatar 范雪寒

feat: homework

parent 0810ee3d
No preview for this file type
import { asyncDelay, RandomInt } from "../script/util"; import { asyncDelay, RandomInt, onHomeworkFinish } from "../script/util";
cc.Class({ cc.Class({
...@@ -315,7 +315,7 @@ cc.Class({ ...@@ -315,7 +315,7 @@ cc.Class({
onClickRotate() { onClickRotate() {
this._cantouch = false this._cantouch = false
let btn = this.picNode.getComponent(cc.Button) let btn = this.picNode.getComponent(cc.Button)
btn.enabled =false btn.enabled = false
cc.Tween.stopAllByTarget(this.picNode) cc.Tween.stopAllByTarget(this.picNode)
cc.tween(this.picNode).to(0.4, { scaleX: 0 }).call(() => { cc.tween(this.picNode).to(0.4, { scaleX: 0 }).call(() => {
if (this.front) { if (this.front) {
...@@ -326,7 +326,7 @@ cc.Class({ ...@@ -326,7 +326,7 @@ cc.Class({
this.front = !this.front this.front = !this.front
}).to(0.4, { scaleX: 1 }).call(() => { }).to(0.4, { scaleX: 1 }).call(() => {
this._cantouch = true this._cantouch = true
btn.enabled =true btn.enabled = true
}).start() }).start()
cc.audioEngine.play(this.clips[3], false) cc.audioEngine.play(this.clips[3], false)
}, },
...@@ -448,7 +448,7 @@ cc.Class({ ...@@ -448,7 +448,7 @@ cc.Class({
let child = picNode.children[5] let child = picNode.children[5]
child.x = (picNode.width - child.width) / 2 child.x = (picNode.width - child.width) / 2
child.y = -(picNode.height - child.height) / 2 child.y = -(picNode.height - child.height) / 2
picNode.scaleY =1 picNode.scaleY = 1
}) })
}, },
/** 设置txt */ /** 设置txt */
...@@ -463,7 +463,7 @@ cc.Class({ ...@@ -463,7 +463,7 @@ cc.Class({
picNode.children[2].getComponent(cc.Sprite).spriteFrame = null picNode.children[2].getComponent(cc.Sprite).spriteFrame = null
picNode.children[5].x = 273.5 picNode.children[5].x = 273.5
picNode.children[5].y = -178 picNode.children[5].y = -178
picNode.scaleY =1 picNode.scaleY = 1
}, },
getSprNode(resName) { getSprNode(resName) {
......
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