feat: 优化动画以及影子

This commit is contained in:
richarjiang
2025-09-29 17:06:20 +08:00
parent dec7ce62ee
commit a253c34a10
349 changed files with 14091 additions and 13324 deletions

View File

@@ -316,7 +316,7 @@ export class PlayerController extends Component {
}
const animation = this.player.getComponent(Animation);
const animation = this.player.getChildByName('Anim').getComponent(Animation);
if (animation) {
// 检查动画是否存在
const state = animation.getState(finalAnimationName);
@@ -450,7 +450,7 @@ export class PlayerController extends Component {
}
// 播放攻击动画
const monsterAnimation = otherCollider.node.getComponent(Animation);
const monsterAnimation = otherCollider.node.getChildByName('Anim').getComponent(Animation);
if (monsterAnimation) {
monsterAnimation.play(`${otherCollider.node.name}_attack`);
}
@@ -694,7 +694,7 @@ export class PlayerController extends Component {
* 弹出武器奖励
*/
public showWeaponBonusPopup() {
this.showPopupAtCameraCenter(this.bonusWuqi, '武器奖励');
// this.showPopupAtCameraCenter(this.bonusWuqi, '武器奖励');
}
private showPopupAtCameraCenter(popup: Node | null, nameForLog: string) {

View File

@@ -55,6 +55,6 @@ export class Shadow2D extends Component {
if (!ui) return;
this.shadowNode.setPosition(0, -ui.height / 2);
this.shadowNode.setPosition(0, -ui.height / 2 + 10);
}
}