diff --git a/Cats/Main.cs b/Cats/Main.cs index ede9980..4864fa1 100644 --- a/Cats/Main.cs +++ b/Cats/Main.cs @@ -5,8 +5,6 @@ using System.Media; using System.Net; using System.Reflection; -using System.Security.Permissions; -using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using Timer = System.Windows.Forms.Timer; @@ -15,6 +13,7 @@ namespace Cats { public partial class Main : Form { + //Original song: Cats (Sped Up) by The living Tombstone private static SoundPlayer player = new SoundPlayer(new WebClient().OpenRead("https://cdn.discordapp.com/attachments/1158146926252916846/1175239862253785118/Cats-Sped-Up.wav")); private static Random random = new Random(); @@ -33,6 +32,7 @@ public partial class Main : Form private static int fps = 40; private static int mspf = 1000 / fps; + public Main() { player.Load(); @@ -71,7 +71,7 @@ public Main() case 3: Init(round_3); - + break; } @@ -93,7 +93,6 @@ public Main() Environment.Exit(0); }); } - private static Image[] round_1 = { (RandomBool() ? Properties.Resources.cat_1 : Properties.Resources.cat_2), Properties.Resources.cat_3, Properties.Resources.cat_4 }; @@ -125,6 +124,7 @@ private void Init(Image[] images) private const int minVelocity = 4; private const int maxVelocity = 15; + private async void TickMovement(object sender, EventArgs e) { await Task.Delay(Math.Max(0, mspf - (int)sw.ElapsedMilliseconds));