You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing this with cargo run gives a surprise: the potion isn't deleted after use! This is because the ECS simply marks entities as dead - it doesn't delete them in systems (so as to not mess up iterators and threading). So after every call to dispatch, we need to add a call to maintain. In main.ecs:
Maybe it is not necessary to do this here, because the maintain is called in self.run_systems();.
the potion isn't deleted after use!
It is because return to RunState::AwaitingInput when use the potion, It will keep waiting for input, and then keypress i, jump to the ShowInventory again.
The text was updated successfully, but these errors were encountered:
In this section of Chapter 9 :
Maybe it is not necessary to do this here, because the
maintain
is called inself.run_systems();
.It is because return to
RunState::AwaitingInput
when use the potion, It will keep waiting for input, and then keypressi
, jump to theShowInventory
again.The text was updated successfully, but these errors were encountered: