From 5becf33df0c33f622ab05de5e71df12fdcdfa8ed Mon Sep 17 00:00:00 2001 From: maxluli Date: Wed, 11 Jan 2023 14:15:08 +0100 Subject: [PATCH] Added 120Fps Support --- Caisses/Form1.Designer.cs | 7 ++++--- Caisses/GraphicalClient.cs | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Caisses/Form1.Designer.cs b/Caisses/Form1.Designer.cs index e87b929..c3c44fa 100644 --- a/Caisses/Form1.Designer.cs +++ b/Caisses/Form1.Designer.cs @@ -52,6 +52,7 @@ // // pbxRayons // + this.pbxRayons.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.pbxRayons.Location = new System.Drawing.Point(12, 12); this.pbxRayons.Name = "pbxRayons"; this.pbxRayons.Size = new System.Drawing.Size(1044, 357); @@ -62,7 +63,7 @@ // this.pbxCaisses.Location = new System.Drawing.Point(12, 375); this.pbxCaisses.Name = "pbxCaisses"; - this.pbxCaisses.Size = new System.Drawing.Size(838, 387); + this.pbxCaisses.Size = new System.Drawing.Size(838, 246); this.pbxCaisses.TabIndex = 1; this.pbxCaisses.TabStop = false; // @@ -182,14 +183,14 @@ // // tmrDraw // - this.tmrDraw.Interval = 17; + this.tmrDraw.Interval = 8; this.tmrDraw.Tick += new System.EventHandler(this.tmrDraw_Tick); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1062, 768); + this.ClientSize = new System.Drawing.Size(1062, 623); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.pbxCaisses); diff --git a/Caisses/GraphicalClient.cs b/Caisses/GraphicalClient.cs index 2b40cd8..b2e2236 100644 --- a/Caisses/GraphicalClient.cs +++ b/Caisses/GraphicalClient.cs @@ -9,8 +9,8 @@ namespace Caisses { public class GraphicalClient : Client { - const int MAX_CLIENT_SPEED = 5; - const int MIN_CLIENT_SPEED = -5; + const float MAX_CLIENT_SPEED = 2.5f; //5 At 60FPS + const float MIN_CLIENT_SPEED = -2.5f; //-5 At 60FPS private PointF _speed; private PointF _position;