首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么这一特性没有得到实现?

为什么这一特性没有得到实现?
EN

Stack Overflow用户
提问于 2020-12-04 15:06:59
回答 1查看 271关注 0票数 2

我想试试amethyst_physics库来做一个游戏。(嗯)我以身作则,但总有一天我不工作:

代码语言:javascript
复制
use amethyst::GameDataBuilder;
use amethyst_physics::{PhysicsBundle};
use amethyst_nphysics::NPhysicsBackend;

fn main() -> amethyst::Result<()> {
    amethyst::start_logger(Default::default());

    let game_data = GameDataBuilder::default()
        .with_bundle(
            PhysicsBundle::<f32, NPhysicsBackend>::new()
        )
    ;
    Ok(())
}

错误:

代码语言:javascript
复制
the trait bound `amethyst_physics::PhysicsBundle<'_, '_, f32, amethyst_nphysics::NPhysicsBackend>: amethyst::amethyst_core::SystemBundle<'_, '_>` is not satisfied
the trait `amethyst::amethyst_core::SystemBundle<'_, '_>` is not implemented for `amethyst_physics::PhysicsBundle<'_, '_, f32, amethyst_nphysics::NPhysicsBackend>`

这里就是一个例子。

我做错了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-12-04 17:41:37

这似乎是个窃听器。它成功地使用amethyst版本0.15.1而不是0.15.3编译。在补丁更改过程中,不会出现这样的回归。

amethyst使用amethyst_core版本0.15.3 (其中定义了SystemBundle ),而amethyst_physics使用amethyst_core版本0.10.1。

我在紫水晶存储库上注册了一个问题

将此用作解决方法:

代码语言:javascript
复制
amethyst = { version = ">=0.15.0, <0.15.3", features = ["empty"] } 
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65145954

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档