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:
@@ -1,5 +1,5 @@
|
||||
use bevy::prelude::*;
|
||||
use solitaire_engine::{GamePlugin, TablePlugin};
|
||||
use solitaire_engine::{CardPlugin, GamePlugin, TablePlugin};
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
@@ -15,5 +15,6 @@ fn main() {
|
||||
)
|
||||
.add_plugins(GamePlugin)
|
||||
.add_plugins(TablePlugin)
|
||||
.add_plugins(CardPlugin)
|
||||
.run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user