Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement some bulding construction prerequisites #140

Merged
merged 6 commits into from
Jun 27, 2022

Conversation

Indy2222
Copy link
Collaborator

No description provided.

Indy2222 added 6 commits June 25, 2022 22:26
This serves as a preparation for handling of different mouse buttons.

It also subtly changes behavior: the events are always fully consumed
thus multiple clicks of the same button within one frame are handled as
a single click.
This makes it possible to access entities inserted by the controller
from other systems (in other crates) in the Update stage.
The systems were executed twice in a quick succession, on press and on
release.
It is the intention to have all input even handling on one place, that
is inside command.rs. Systems in this module send events to other
systems which implement low-level implementation.

With this slightly updated architecture, it will be easier to overload
left-click handling (e.g. selection vs construction of a new building).

Relates to #23.
This has the following benefits:

* Future object spawning crates (e.g. controller) won't have to depend
  on map crate and structures which are tight with persistent map format.

* Spawn events no longer need to be buffered and resend.

Relates to #23.
@Indy2222 Indy2222 merged commit 38acb06 into main Jun 27, 2022
@Indy2222 Indy2222 deleted the feature/improvements branch June 27, 2022 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant