feat: 优化动画以及影子
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user