- Two-timer architecture: game timer + 60fps render timer for smooth interpolation - Snake body: StreamGeometry path with teal gradient, rounded joins - Directional head with white eyes and dark pupils - Food: pulsating glow, highlight, green leaf animation - Modern dark theme (#0D1117), glassmorphism HUD - Speed indicator bar, score +N popup - High score persistence to JSON - All keyboard shortcuts: Arrows, WASD, Space/P pause, Enter start, R restart, Esc quit - Window resizable, 640x540 default New files: AnimationHelper.cs, HighScoreManager.cs, SnakeRenderer.cs
39 lines
1.5 KiB
XML
39 lines
1.5 KiB
XML
<Application xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="Snake.Avalonia.App"
|
|
RequestedThemeVariant="Dark">
|
|
|
|
<Application.Styles>
|
|
<FluentTheme />
|
|
|
|
<!-- Custom styles for game buttons -->
|
|
<Style Selector="Button.GameButton">
|
|
<Setter Property="Background" Value="#0D9488" />
|
|
<Setter Property="Foreground" Value="#E6EDF3" />
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
<Setter Property="CornerRadius" Value="8" />
|
|
<Setter Property="Padding" Value="16,8" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
</Style>
|
|
|
|
<Style Selector="Button.GameButton:pointerover">
|
|
<Setter Property="Background" Value="#14B8A6" />
|
|
</Style>
|
|
|
|
<Style Selector="Button.GameButton:pressed">
|
|
<Setter Property="Background" Value="#0F766E" />
|
|
</Style>
|
|
|
|
<Style Selector="Button.GameButtonSecondary">
|
|
<Setter Property="Background" Value="#1C2128" />
|
|
<Setter Property="BorderBrush" Value="#30363D" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
</Style>
|
|
|
|
<Style Selector="Button.GameButtonSecondary:pointerover">
|
|
<Setter Property="Background" Value="#30363D" />
|
|
</Style>
|
|
</Application.Styles>
|
|
</Application>
|