25 lines
618 B
TypeScript
25 lines
618 B
TypeScript
import { _decorator, Component, Node, tween, Vec3 } from 'cc';
|
|
import { SkillCom } from './SkillCom';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('NoRunCom')
|
|
export class NoRunCom extends Component {
|
|
start() {
|
|
let base =this.node.getComponent(SkillCom)
|
|
tween(this.node).to( base.in_time,
|
|
{ position: new Vec3(this.node.position.x,this.node.position.y) },
|
|
{
|
|
onComplete: (target?: object) => {
|
|
base.is_destroy=true
|
|
},
|
|
}
|
|
).start();
|
|
}
|
|
|
|
update(deltaTime: number) {
|
|
|
|
}
|
|
}
|
|
|
|
|