mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Removed deprecated Application.Get()
This commit is contained in:
@@ -38,9 +38,6 @@ namespace GlitchyEngine
|
||||
|
||||
public GameTime GameTime => _gameTime;
|
||||
|
||||
[Inline, Obsolete("Use Application.Instance instead.", false), NoShow]
|
||||
public static Application Get() => s_Instance;
|
||||
|
||||
public static Application Instance => s_Instance;
|
||||
|
||||
public this()
|
||||
|
||||
@@ -115,7 +115,7 @@ struct AssetHandle<T> where T : Asset
|
||||
_contentManager = _asset?.ContentManager;
|
||||
if (_contentManager == null)
|
||||
_contentManager = contentManager;
|
||||
//_currentFrame = (uint8)Application.Get().GameTime.FrameCount;
|
||||
//_currentFrame = (uint8)Application.Instance.GameTime.FrameCount;
|
||||
}
|
||||
|
||||
// Creates a new invalid asset handle
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace GlitchyEngine.Content
|
||||
var contentManager;
|
||||
|
||||
if (contentManager == null)
|
||||
contentManager = Application.Get().ContentManager;
|
||||
contentManager = Application.Instance.ContentManager;
|
||||
|
||||
AssetHandle handle = contentManager.LoadAsset(assetHandle, blocking);
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace GlitchyEngine.Content
|
||||
var contentManager;
|
||||
|
||||
if (contentManager == null)
|
||||
contentManager = Application.Get().ContentManager;
|
||||
contentManager = Application.Instance.ContentManager;
|
||||
|
||||
AssetHandle handle = contentManager.LoadAsset(assetIdentifier, blocking);
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace GlitchyEngine.Content
|
||||
var contentManager;
|
||||
|
||||
if (contentManager == null)
|
||||
contentManager = Application.Get().ContentManager;
|
||||
contentManager = Application.Instance.ContentManager;
|
||||
|
||||
contentManager.ManageAsset(asset);
|
||||
}*/
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace GlitchyEngine.Content
|
||||
// TODO: load with content manager
|
||||
|
||||
result = CGLTF.LoadBuffers(options, modelData, (char8*)null);
|
||||
//result = LoadBuffersWithContentManager(options, modelData, meshName, Application.Get().ContentManager);
|
||||
//result = LoadBuffersWithContentManager(options, modelData, meshName, Application.Instance.ContentManager);
|
||||
|
||||
GeometryBinding geoBinding = null;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace GlitchyEngine
|
||||
{
|
||||
Debug.Profiler.ProfileFunction!();
|
||||
|
||||
if(Application.Get().Window.IsActive)
|
||||
if(Application.Instance.Window.IsActive)
|
||||
{
|
||||
float3 movement = .();
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace GlitchyEngine
|
||||
{
|
||||
Debug.Profiler.ProfileFunction!();
|
||||
|
||||
if(Application.Get().Window.IsActive)
|
||||
if(Application.Instance.Window.IsActive)
|
||||
{
|
||||
float3 movement = .();
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace GlitchyEngine.Renderer
|
||||
{
|
||||
Debug.Profiler.ProfileFunction!();
|
||||
|
||||
nativeSwapChain.Present(Application.Get().Window.IsVSync ? 1 : 0, .None);
|
||||
nativeSwapChain.Present(Application.Instance.Window.IsVSync ? 1 : 0, .None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace GlitchyEngine
|
||||
|
||||
public override static void SetMousePosition(int2 pos)
|
||||
{
|
||||
HWnd windowHandle = (HWnd)(int)Application.Get().Window.NativeWindow;
|
||||
HWnd windowHandle = (HWnd)(int)Application.Instance.Window.NativeWindow;
|
||||
|
||||
var pos;
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace GlitchyEngine
|
||||
|
||||
public override static void Impl_NewFrame()
|
||||
{
|
||||
Window window = Application.Get().Window;
|
||||
Window window = Application.Instance.Window;
|
||||
|
||||
Debug.Profiler.ProfileFunction!();
|
||||
|
||||
@@ -260,7 +260,7 @@ namespace GlitchyEngine
|
||||
|
||||
public override static void Impl_EndFrame()
|
||||
{
|
||||
Application.Get().Window.[Friend]_rawMouseMovementAccumulator = .Zero;
|
||||
Application.Instance.Window.[Friend]_rawMouseMovementAccumulator = .Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user