Auto-sync: 20260314_180000
This commit is contained in:
parent
e1861031a8
commit
bbcd80a6a9
2 changed files with 69 additions and 50 deletions
BIN
lib/.DS_Store
vendored
BIN
lib/.DS_Store
vendored
Binary file not shown.
|
|
@ -291,7 +291,7 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
|
||||||
|
|
||||||
String? bgImage;
|
String? bgImage;
|
||||||
if (themeType == AppThemeType.wood) bgImage = 'assets/images/wood_bg.jpg';
|
if (themeType == AppThemeType.wood) bgImage = 'assets/images/wood_bg.jpg';
|
||||||
if (themeType == AppThemeType.doodle) bgImage = 'assets/images/doodle_bg.jpg';
|
if (themeType == AppThemeType.doodle) bgImage = 'assets/images/doodle_bg.jpg'; // Questo è lo sfondo carta
|
||||||
if (themeType == AppThemeType.cyberpunk) bgImage = 'assets/images/cyber_bg.jpg';
|
if (themeType == AppThemeType.cyberpunk) bgImage = 'assets/images/cyber_bg.jpg';
|
||||||
if (themeType == AppThemeType.music) bgImage = 'assets/images/music_bg.jpg';
|
if (themeType == AppThemeType.music) bgImage = 'assets/images/music_bg.jpg';
|
||||||
|
|
||||||
|
|
@ -342,7 +342,6 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
// --- IL VERO SFONDO SFOCATO SAGOMATO ---
|
// --- IL VERO SFONDO SFOCATO SAGOMATO ---
|
||||||
// Ritaglia il filtro di sfocatura esattamente sulla forma dell'arena
|
|
||||||
if (themeType == AppThemeType.music)
|
if (themeType == AppThemeType.music)
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: ClipPath(
|
child: ClipPath(
|
||||||
|
|
@ -350,7 +349,7 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
|
||||||
child: BackdropFilter(
|
child: BackdropFilter(
|
||||||
filter: ImageFilter.blur(sigmaX: 8.0, sigmaY: 8.0),
|
filter: ImageFilter.blur(sigmaX: 8.0, sigmaY: 8.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Colors.white.withOpacity(0.08), // La patina chiara
|
color: Colors.white.withOpacity(0.08),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -430,33 +429,55 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
|
||||||
canPop: true,
|
canPop: true,
|
||||||
onPopInvoked: (didPop) { gameController.disconnectOnlineGame(); },
|
onPopInvoked: (didPop) { gameController.disconnectOnlineGame(); },
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: bgImage != null ? Colors.transparent : theme.background,
|
backgroundColor: Colors.transparent, // Assicuriamo che la scaffold base sia trasparente
|
||||||
body: Container(
|
body: Stack(
|
||||||
decoration: bgImage != null ? BoxDecoration(image: DecorationImage(image: AssetImage(bgImage), fit: BoxFit.cover, colorFilter: themeType == AppThemeType.doodle ? ColorFilter.mode(Colors.white.withOpacity(0.7), BlendMode.lighten) : null)) : null,
|
|
||||||
child: CustomPaint(
|
|
||||||
painter: themeType == AppThemeType.doodle ? FullScreenGridPainter(Colors.black.withOpacity(0.06)) : null,
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
children: [
|
||||||
|
// 1. Sfondo base a tinta unita (In caso non ci sia l'immagine)
|
||||||
|
Container(color: themeType == AppThemeType.doodle ? Colors.white : theme.background),
|
||||||
|
|
||||||
|
// 2. Immagine di Sfondo per tutti i temi che la supportano
|
||||||
|
if (bgImage != null)
|
||||||
|
Positioned.fill(
|
||||||
|
child: Image.asset(
|
||||||
|
bgImage,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// 3. Griglia a righe incrociate per il doodle (Sopra l'immagine di carta)
|
||||||
|
if (themeType == AppThemeType.doodle)
|
||||||
|
Positioned.fill(
|
||||||
|
child: CustomPaint(
|
||||||
|
painter: FullScreenGridPainter(Colors.blue.withOpacity(0.15)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// 4. Patina scura (Cyberpunk e Music) per far risaltare il neon
|
||||||
if (bgImage != null && (themeType == AppThemeType.cyberpunk || themeType == AppThemeType.music))
|
if (bgImage != null && (themeType == AppThemeType.cyberpunk || themeType == AppThemeType.music))
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.topCenter, end: Alignment.bottomCenter,
|
begin: Alignment.topCenter, end: Alignment.bottomCenter,
|
||||||
colors: [Colors.black.withOpacity(0.3), Colors.black.withOpacity(0.8)]
|
colors: [Colors.black.withOpacity(0.4), Colors.black.withOpacity(0.8)]
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
// 5. Effetto "Furia" o Timeout
|
||||||
if (gameController.isTimeMode && !gameController.isCPUThinking && !gameController.isGameOver && gameController.timeLeft > 0 && gameController.timeLeft <= 5 && !gameController.isSetupPhase)
|
if (gameController.isTimeMode && !gameController.isCPUThinking && !gameController.isGameOver && gameController.timeLeft > 0 && gameController.timeLeft <= 5 && !gameController.isSetupPhase)
|
||||||
Positioned.fill(child: BlitzBackgroundEffect(timeLeft: gameController.timeLeft, color: theme.playerRed, themeType: themeType)),
|
Positioned.fill(child: BlitzBackgroundEffect(timeLeft: gameController.timeLeft, color: theme.playerRed, themeType: themeType)),
|
||||||
|
|
||||||
|
// 6. Testo degli Eventi
|
||||||
if (gameController.effectText.isNotEmpty)
|
if (gameController.effectText.isNotEmpty)
|
||||||
Positioned.fill(child: SpecialEventBackgroundEffect(text: gameController.effectText, color: gameController.effectColor, themeType: themeType)),
|
Positioned.fill(child: SpecialEventBackgroundEffect(text: gameController.effectText, color: gameController.effectColor, themeType: themeType)),
|
||||||
|
|
||||||
|
// 7. Il Gioco Vero e Proprio
|
||||||
Positioned.fill(child: gameContent),
|
Positioned.fill(child: gameContent),
|
||||||
|
|
||||||
|
// 8. Schermata Passaggio Dispositivo
|
||||||
if (gameController.isSetupPhase && !_hideJokerMessage)
|
if (gameController.isSetupPhase && !_hideJokerMessage)
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -475,13 +496,12 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
// 9. Effetti di Vittoria
|
||||||
if (gameController.isGameOver && gameController.board.scoreRed != gameController.board.scoreBlue)
|
if (gameController.isGameOver && gameController.board.scoreRed != gameController.board.scoreBlue)
|
||||||
Positioned.fill(child: IgnorePointer(child: WinnerVFXOverlay(winnerColor: gameController.board.scoreRed > gameController.board.scoreBlue ? theme.playerRed : theme.playerBlue, themeType: themeType))),
|
Positioned.fill(child: IgnorePointer(child: WinnerVFXOverlay(winnerColor: gameController.board.scoreRed > gameController.board.scoreBlue ? theme.playerRed : theme.playerBlue, themeType: themeType))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -530,7 +550,6 @@ class _ArenaClipper extends CustomClipper<Path> {
|
||||||
Path path = Path();
|
Path path = Path();
|
||||||
|
|
||||||
for (var box in board.boxes) {
|
for (var box in board.boxes) {
|
||||||
// Ignora i buchi in modo che non vengano sfocati!
|
|
||||||
if (box.type != BoxType.invisible) {
|
if (box.type != BoxType.invisible) {
|
||||||
path.addRect(Rect.fromLTWH(
|
path.addRect(Rect.fromLTWH(
|
||||||
box.x * spacing + offset,
|
box.x * spacing + offset,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue