feat(engine): add InputPlugin with keyboard and stock-click
Keyboard: U=undo, N=new game, D=draw, Escape=pause placeholder (logged only until the pause screen lands). Mouse: left-click on the stock pile fires DrawRequestEvent. Cursor coordinates are converted via the active Camera2d's viewport_to_world_2d so the hit-test works under arbitrary camera setups. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use bevy::prelude::*;
|
||||
use solitaire_engine::{CardPlugin, GamePlugin, TablePlugin};
|
||||
use solitaire_engine::{CardPlugin, GamePlugin, InputPlugin, TablePlugin};
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
@@ -16,5 +16,6 @@ fn main() {
|
||||
.add_plugins(GamePlugin)
|
||||
.add_plugins(TablePlugin)
|
||||
.add_plugins(CardPlugin)
|
||||
.add_plugins(InputPlugin)
|
||||
.run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user