1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
| const { ccclass, property } = cc._decorator;
|
| @ccclass
| export default class ScaleForever extends cc.Component {
| @property
| scaleMax: number = 1;
|
| @property
| scaleMin: number = 0.9;
|
| onEnable() {
| this.node.runAction(
| cc.repeatForever(
| cc.sequence(
| cc.scaleTo(0.5, this.scaleMax),
| cc.scaleTo(0.3, this.scaleMin)
| )
| )
| );
| }
| }
|
|