完成AI组件与AI行为

This commit is contained in:
Ziyu
2025-06-16 14:44:47 +08:00
parent 5e4f6c587f
commit 45367bed41
14 changed files with 504 additions and 25 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ namespace game::component::state {
void JumpState::enter() {
playAnimation("jump"); // 播放跳跃动画
auto physics_component = player_component_->getPhysicsComponent();
physics_component->velocity_.y = -player_component_->getJumpForce(); // 向上跳跃
physics_component->velocity_.y = -player_component_->getJumpVelocity(); // 向上跳跃
spdlog::debug("PlayerComponent 进入 JumpState,设置初始垂直速度为: {}", physics_component->velocity_.y);
}