Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Commit e4cfcd5

Browse files
author
Alexis Huvier
committed
style(se): Import and regions in projects
1 parent 2ee066f commit e4cfcd5

File tree

10 files changed

+30
-25
lines changed

10 files changed

+30
-25
lines changed

SharpEngine/Component/TextComponent.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System.Numerics;
2-
using Raylib_cs;
1+
using Raylib_cs;
32
using SharpEngine.Math;
43
using Color = SharpEngine.Utils.Color;
54

@@ -46,7 +45,7 @@ public class TextComponent: Component
4645
/// Create TextComponent
4746
/// </summary>
4847
/// <param name="text">Text</param>
49-
/// <param name="font">Font Name (RAYLIB_DEFAULT)</param>
48+
/// <param name="font">Font Name (RAYLIB_DEFAULT)</param>
5049
/// <param name="color">Color (Color.Black)</param>
5150
/// <param name="displayed">If Text is Displayed (true)</param>
5251
/// <param name="fontSize">Font Size (null)</param>

SharpEngine/Component/TransformComponent.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using SharpEngine.Manager;
2-
using SharpEngine.Math;
1+
using SharpEngine.Math;
32

43
namespace SharpEngine.Component;
54

SharpEngine/Math/Rect.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using System;
2-
using System.Numerics;
3-
using Raylib_cs;
42

53
namespace SharpEngine.Math;
64

SharpEngine/Scene.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
using System;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
32
using System.Linq;
43
using SharpEngine.Math;
54
using SharpEngine.Utils;
6-
using tainicom.Aether.Physics2D.Common;
75
using tainicom.Aether.Physics2D.Dynamics;
86

97
namespace SharpEngine;

SharpEngine/Utils/EventArgs/ValueEventArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class ValueEventArgs<T>: System.EventArgs
1010
/// Old Value
1111
/// </summary>
1212
public T OldValue { get; init; }
13-
13+
1414
/// <summary>
1515
/// New Value
1616
/// </summary>

SharpEngine/Utils/Extensions.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,25 @@
55
namespace SharpEngine.Utils;
66

77
internal static class Extensions
8-
{
8+
{
9+
#region Input Converter
10+
911
public static Raylib_cs.MouseButton ToRayLib(this MouseButton button) => (Raylib_cs.MouseButton)button;
1012
public static KeyboardKey ToRayLib(this Key key) => (KeyboardKey)key;
1113
public static GamepadButton ToRayLib(this GamePadButton button) => (GamepadButton)button;
1214
public static GamepadAxis ToRayLib(this GamePadAxis axis) => (GamepadAxis)axis;
13-
public static TraceLogLevel ToRayLib(this LogLevel logLevel) => (TraceLogLevel)logLevel;
1415

1516
public static MouseButton ToSe(this Raylib_cs.MouseButton button) => (MouseButton)button;
1617
public static Key ToSe(this KeyboardKey key) => (Key)key;
1718
public static GamePadButton ToSe(this GamepadButton button) => (GamePadButton)button;
1819
public static GamePadAxis ToSe(this GamepadAxis axis) => (GamePadAxis)axis;
20+
21+
#endregion
22+
23+
#region LogLevel Converter
24+
25+
public static TraceLogLevel ToRayLib(this LogLevel logLevel) => (TraceLogLevel)logLevel;
1926
public static LogLevel ToSe(this TraceLogLevel logLevel) => (LogLevel)logLevel;
27+
28+
#endregion
2029
}

SharpEngine/Utils/Physic/FixtureInfo.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using SharpEngine.Math;
3-
using tainicom.Aether.Physics2D.Dynamics;
4-
using tainicom.Aether.Physics2D.Dynamics.Contacts;
1+
using SharpEngine.Math;
52

63
namespace SharpEngine.Utils.Physic;
74

SharpEngine/Widget/LineInput.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using System;
2-
using System.Numerics;
3-
using System.Text;
42
using Raylib_cs;
53
using SharpEngine.Manager;
64
using SharpEngine.Math;

SharpEngine/Widget/MultiLineInput.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using System;
2-
using System.Numerics;
3-
using System.Text;
42
using Raylib_cs;
53
using SharpEngine.Manager;
64
using SharpEngine.Math;

SharpEngine/Window.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,18 +261,21 @@ public void Run()
261261
}
262262

263263
#endregion
264+
265+
#region Update
264266

265-
// UPDATE
266267
_seImGui.Update(Raylib.GetFrameTime());
267268

268269
CurrentScene.Update(Raylib.GetFrameTime());
269270
CameraManager.Update(Raylib.GetFrameTime());
270-
271-
// DRAW IMGUI
271+
272+
#endregion
273+
274+
#region Draw
275+
272276
if(Debug)
273277
RenderImGui?.Invoke(this);
274278

275-
// DRAW
276279
Raylib.BeginDrawing();
277280
Raylib.ClearBackground(BackgroundColor);
278281

@@ -286,7 +289,11 @@ public void Run()
286289
_seImGui.Draw();
287290

288291
Raylib.EndDrawing();
292+
293+
#endregion
289294
}
295+
296+
#region Unload
290297

291298
// UNLOAD
292299
DebugManager.Log(LogLevel.LogInfo, "Unloading Scenes...");
@@ -304,6 +311,8 @@ public void Run()
304311
DebugManager.Log(LogLevel.LogInfo, "Closing Window.");
305312
Raylib.CloseAudioDevice();
306313
Raylib.CloseWindow();
314+
315+
#endregion
307316
}
308317

309318
/// <summary>

0 commit comments

Comments
 (0)