feat: smooth snake animation + beautiful Avalonia UI overhaul
- 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
This commit is contained in:
@@ -3,11 +3,14 @@
|
||||
xmlns:views="using:Snake.Avalonia.Views"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="420"
|
||||
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="540"
|
||||
x:Class="Snake.Avalonia.MainWindow"
|
||||
Title="Snake"
|
||||
Width="480"
|
||||
Height="420"
|
||||
CanResize="False">
|
||||
Title="🐍 Snake"
|
||||
MinWidth="540"
|
||||
MinHeight="460"
|
||||
Width="640"
|
||||
Height="540"
|
||||
Background="#0D1117"
|
||||
ExtendClientAreaToDecorationsHint="False">
|
||||
<views:GameView />
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user