feat: add carpet
This commit is contained in:
@@ -31,6 +31,7 @@ class GameScreen extends StatefulWidget {
|
||||
|
||||
class _GameScreenState extends State<GameScreen> {
|
||||
late final HokmGame _game;
|
||||
String _carpet = 'classic'; // فرشِ انتخابی (برای پسزمینهی پشتِ صحنه)
|
||||
Timer? _introTimer;
|
||||
bool _introHidden = false;
|
||||
int _countdown = 0; // شمارشِ معکوسِ شروعِ بازی پس از یافتنِ حریفان (۳…۲…۱)
|
||||
@@ -40,9 +41,11 @@ class _GameScreenState extends State<GameScreen> {
|
||||
super.initState();
|
||||
final ws = context.read<WalletBloc>().state.walletStatus;
|
||||
final skin = ws is WalletLoaded ? ws.wallet.selectedCard : 'simple';
|
||||
_carpet = ws is WalletLoaded ? ws.wallet.selectedCarpet : 'classic';
|
||||
_game = HokmGame(
|
||||
context.read<GameBloc>(),
|
||||
skin: skin.isEmpty ? 'simple' : skin,
|
||||
carpet: _carpet.isEmpty ? 'classic' : _carpet,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -114,6 +117,7 @@ class _GameScreenState extends State<GameScreen> {
|
||||
}
|
||||
return Stack(
|
||||
children: [
|
||||
// فرش بهعنوانِ سطحِ میز داخلِ صحنهی Flame (Felt) کشیده میشود.
|
||||
GameWidget(game: _game),
|
||||
if (!_showSearch(state) && state.state != null)
|
||||
TableHud(
|
||||
|
||||
Reference in New Issue
Block a user