1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- // Learn TypeScript:
- // - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
- // Learn Attribute:
- // - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
- // Learn life-cycle callbacks:
- // - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
- import PopComponet from "../Template/PopComponet";
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class TimePause extends PopComponet {
- protected start(): void {
- let b1 = this.node.getChildByName("b1")
- let b2 = this.node.getChildByName("b2")
- let b3 = this.node.getChildByName("b3")
- let b4 = this.node.getChildByName("b4")
- cc.tween(b1)
- .by(0.3, { x: -264 / 2, y: -123 / 2 })
- .by(0.3, { x: -3000 })
- .start()
- cc.tween(b2)
- .by(0.3, { x: -264 / 2, y: -123 / 2 })
- .by(0.3, { x: -3000 })
- .start()
- cc.tween(b3)
- .by(0.3, { x: 264 / 2, y: 123 / 2 })
- .by(0.3, { x: 3000 })
- .start()
- cc.tween(b4)
- .by(0.3, { x: 264 / 2, y: 123 / 2 })
- .by(0.3, { x: 3000 })
- .start()
- this.scheduleOnce(() => {
- if (this.isValid) {
- this.Surpclose()
- }
- }, 0.6)
- }
- }
|