伤害技能添加,技能还需完善

This commit is contained in:
2024-08-26 23:42:38 +08:00
parent 8a44a15153
commit ede4ffd4ca
20 changed files with 1439 additions and 330 deletions

View File

@@ -45,9 +45,9 @@ export class SkillCom extends CCComp {
}
if(this.t_pos){
//通过欧拉角 延长 目标点 增量
this.t_pos.x=Math.cos(this.angle * Math.PI / 180) * this.dis;
this.t_pos.y=Math.sin(this.angle * Math.PI / 180) * this.dis;
tween(this.node).to( 1,{ angle:this.angle,position: this.t_pos},
// this.t_pos.x=Math.cos(this.angle * Math.PI / 180) * this.dis;
// this.t_pos.y=Math.sin(this.angle * Math.PI / 180) * this.dis;
tween(this.node).to( 0.5,{ angle:this.angle,position: this.t_pos},
{
onUpdate: (target: Vec3, ratio: number) => { // onUpdate 接受当前缓动的进度
// 将缓动系统计算出的结果赋予 node 的位置