perf
This commit is contained in:
@@ -458,7 +458,7 @@ export class PlayerController extends Component {
|
|||||||
}
|
}
|
||||||
this.switchAnimation(this.currentDirection === 3 ? 'attack3' : 'attack5');
|
this.switchAnimation(this.currentDirection === 3 ? 'attack3' : 'attack5');
|
||||||
|
|
||||||
// 2秒后判定攻击结果
|
// 1.2秒后判定攻击结果
|
||||||
this.scheduleOnce(async () => {
|
this.scheduleOnce(async () => {
|
||||||
// 比较生命值,判断输赢
|
// 比较生命值,判断输赢
|
||||||
console.log('判定攻击结果,玩家HP:', playerHp, '怪物HP:', monsterHp);
|
console.log('判定攻击结果,玩家HP:', playerHp, '怪物HP:', monsterHp);
|
||||||
@@ -537,7 +537,7 @@ export class PlayerController extends Component {
|
|||||||
console.log('停止攻击音效');
|
console.log('停止攻击音效');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 2);
|
}, 1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user