123456789101112131415161718 |
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class spritearrow extends cc.Component {
- time = 0
- _material
- start() {
- this.time = 0;
- this._material = this.getComponent(cc.Sprite).getMaterial(0);
- }
-
- update() {
- this.time += 0.0031;
- this._material.setProperty('time', this.time);
- }
- }
|