Hello again!
So I am exploring ECS with this tutorial (@alice I am sorry, I did not watch the video you recommended yet -I have to plan those 42 minutes ^^- so I hope those questions are relevant).
I ran into 3 errors that are very confusing:
1. not implemented
^^^^^^^^ the trait specs::world::comp::Component
is not implemented for Position
The tutorial does not implement anything at this stage, so I added
impl Component for Position {
type Storage = VecStorage<Self>;
}
as per the specs docs. Is it correct and all that needs to be done?
2. cannot find attribute
and 3. cannot derive macro
cannot find attribute
storage in this scope
cannot find derive macro
Component in this scope
According to SO, it should be very easy to solve. Make sure Cargo.toml has the required dependencies, and I have (added specs-derive just to be sure!!)
[dependencies]
ggez="0.5.1"
specs= {version = "0.15.0", feature = ["specs-derive"]}
specs-derive = "0.4.1"
and make sure you have imported the derive and crate with use, which I have:
use specs::{
join::Join, Builder, Component, ReadStorage, RunNow, System, VecStorage, World, WorldExt,
};
I even tried to run the author's code to make sure it was not a typo but it produces the same errors.
What shall I do to fix the errors?