From 9faf11f5ab62082e7b03bc93b8006b1704aa09ba Mon Sep 17 00:00:00 2001 From: Aytackydln Date: Thu, 31 Oct 2024 02:15:52 +0100 Subject: [PATCH] fix compile errors --- .../Layers/ResidentEvil2HealthLayerHandler.cs | 4 ++-- .../ResidentEvil2/Layers/ResidentEvil2RankLayerHandler.cs | 4 ++-- .../Plugin-Example/Layers/ExampleLayerHandler.cs | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Project-Aurora/MemoryAccessProfiles/Profiles/ResidentEvil2/Layers/ResidentEvil2HealthLayerHandler.cs b/Project-Aurora/MemoryAccessProfiles/Profiles/ResidentEvil2/Layers/ResidentEvil2HealthLayerHandler.cs index bf31f2327..75605ac81 100644 --- a/Project-Aurora/MemoryAccessProfiles/Profiles/ResidentEvil2/Layers/ResidentEvil2HealthLayerHandler.cs +++ b/Project-Aurora/MemoryAccessProfiles/Profiles/ResidentEvil2/Layers/ResidentEvil2HealthLayerHandler.cs @@ -32,7 +32,7 @@ public override void Default() } -public class ResidentEvil2HealthLayerHandler : LayerHandler +public class ResidentEvil2HealthLayerHandler() : LayerHandler("Resident Evil 2 - Health") { private long previoustime = 0; private long currenttime = 0; @@ -73,7 +73,7 @@ protected override UserControl CreateControl() public override EffectLayer Render(IGameState state) { - EffectLayer bg_layer = new EffectLayer("Resident Evil 2 - Health"); + var bg_layer = EffectLayer; if (state is GameState_ResidentEvil2) { diff --git a/Project-Aurora/MemoryAccessProfiles/Profiles/ResidentEvil2/Layers/ResidentEvil2RankLayerHandler.cs b/Project-Aurora/MemoryAccessProfiles/Profiles/ResidentEvil2/Layers/ResidentEvil2RankLayerHandler.cs index 876420e94..6b018d007 100644 --- a/Project-Aurora/MemoryAccessProfiles/Profiles/ResidentEvil2/Layers/ResidentEvil2RankLayerHandler.cs +++ b/Project-Aurora/MemoryAccessProfiles/Profiles/ResidentEvil2/Layers/ResidentEvil2RankLayerHandler.cs @@ -23,7 +23,7 @@ public override void Default() } -public class ResidentEvil2RankLayerHandler : LayerHandler +public class ResidentEvil2RankLayerHandler() : LayerHandler("Resident Evil 2 - Rank") { protected override UserControl CreateControl() { @@ -32,7 +32,7 @@ protected override UserControl CreateControl() public override EffectLayer Render(IGameState state) { - EffectLayer keys_layer = new EffectLayer( "Resident Evil 2 - Rank" ); + var keys_layer = EffectLayer; if (state is GameState_ResidentEvil2) { diff --git a/Project-Aurora/Plugin-Example/Layers/ExampleLayerHandler.cs b/Project-Aurora/Plugin-Example/Layers/ExampleLayerHandler.cs index 44a93ef3b..415ab9172 100644 --- a/Project-Aurora/Plugin-Example/Layers/ExampleLayerHandler.cs +++ b/Project-Aurora/Plugin-Example/Layers/ExampleLayerHandler.cs @@ -10,7 +10,7 @@ public partial class ExampleLayerHandlerProperties : LayerHandlerProperties } - public class ExampleLayerHandler : LayerHandler + public class ExampleLayerHandler() : LayerHandler("ExampleLayer") { protected override UserControl CreateControl() { @@ -19,9 +19,8 @@ protected override UserControl CreateControl() public override EffectLayer Render(IGameState gamestate) { - EffectLayer solidcolor_layer = new EffectLayer("ExampleLayer"); - solidcolor_layer.Set(Properties.Sequence, Properties.PrimaryColor); - return solidcolor_layer; + EffectLayer.Set(Properties.Sequence, Properties.PrimaryColor); + return EffectLayer; } } }