feat(engine): add CardPlugin with procedural card rendering
Each card is a parent Sprite (white for face-up, blue for face-down) with a Text2d child showing rank+suit (e.g. "AH", "10C", "KS"). Hearts and diamonds render red; clubs and spades black. Face-down labels are hidden. Tableau cards fan downward; other piles stack at the same position with a small z-offset. Sync runs in PostStartup for the initial deal and in Update after every StateChangedEvent. To avoid a one-frame lag, downstream plugins run after the new GameMutation system set. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -4,17 +4,19 @@
|
||||
//! Additional plugins (`TablePlugin`, `CardPlugin`, `InputPlugin`,
|
||||
//! `AnimationPlugin`, etc.) land in later sub-phases of Phase 3.
|
||||
|
||||
pub mod card_plugin;
|
||||
pub mod events;
|
||||
pub mod game_plugin;
|
||||
pub mod layout;
|
||||
pub mod resources;
|
||||
pub mod table_plugin;
|
||||
|
||||
pub use card_plugin::{CardEntity, CardLabel, CardPlugin};
|
||||
pub use events::{
|
||||
CardFlippedEvent, DrawRequestEvent, GameWonEvent, MoveRequestEvent, NewGameRequestEvent,
|
||||
StateChangedEvent, UndoRequestEvent,
|
||||
};
|
||||
pub use game_plugin::GamePlugin;
|
||||
pub use game_plugin::{GameMutation, GamePlugin};
|
||||
pub use layout::{compute_layout, Layout, LayoutResource};
|
||||
pub use resources::{DragState, GameStateResource, SyncStatus, SyncStatusResource};
|
||||
pub use table_plugin::{PileMarker, TableBackground, TablePlugin};
|
||||
|
||||
Reference in New Issue
Block a user