mirror of
https://github.com/edgegamers/Jailbreak.git
synced 2025-12-05 20:40:29 -08:00
Basic draw manager
This commit is contained in:
@@ -22,6 +22,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lang", "lang", "{CDCDE44E-0
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jailbreak.English", "lang\Jailbreak.English\Jailbreak.English.csproj", "{FC2D6F50-BCFF-41E6-A965-6C73CC01C3BF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jailbreak.Draw", "mod\Jailbreak.Draw\Jailbreak.Draw.csproj", "{E809B726-088D-4BC6-95C9-EE6A991C8AA9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -56,6 +58,10 @@ Global
|
||||
{FC2D6F50-BCFF-41E6-A965-6C73CC01C3BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FC2D6F50-BCFF-41E6-A965-6C73CC01C3BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FC2D6F50-BCFF-41E6-A965-6C73CC01C3BF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E809B726-088D-4BC6-95C9-EE6A991C8AA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E809B726-088D-4BC6-95C9-EE6A991C8AA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E809B726-088D-4BC6-95C9-EE6A991C8AA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E809B726-088D-4BC6-95C9-EE6A991C8AA9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{9135CCC9-66C5-4A9C-AE3C-91475B5F0437} = {177DA48D-8306-4102-918D-992569878581}
|
||||
@@ -65,5 +71,6 @@ Global
|
||||
{28EE05E4-8FE3-4CC6-AA03-0C533EFBFBF2} = {36BA84C0-291C-4930-A7C6-97CDF8F7F0D7}
|
||||
{446E0B6F-E4FE-45E6-BD9B-BD943698327A} = {59311734-3648-43C2-B43C-385718B0D103}
|
||||
{FC2D6F50-BCFF-41E6-A965-6C73CC01C3BF} = {CDCDE44E-01D2-4B76-99DA-A57E1E956038}
|
||||
{E809B726-088D-4BC6-95C9-EE6A991C8AA9} = {36BA84C0-291C-4930-A7C6-97CDF8F7F0D7}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "7.0.0",
|
||||
"version": "8.0.0",
|
||||
"rollForward": "latestMinor",
|
||||
"allowPrerelease": false
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
using Jailbreak.Draw.Global;
|
||||
using Jailbreak.Public.Extensions;
|
||||
using Jailbreak.Public.Mod.Draw;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Jailbreak.Draw;
|
||||
|
||||
public static class DrawServiceExtension
|
||||
|
||||
@@ -1,5 +1,30 @@
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Modules.Timers;
|
||||
using Jailbreak.Public.Behaviors;
|
||||
using Jailbreak.Public.Mod.Draw;
|
||||
|
||||
namespace Jailbreak.Draw.Global;
|
||||
|
||||
public class DrawManager : IPluginBehavior {
|
||||
|
||||
public class DrawManager : IPluginBehavior, IDrawService
|
||||
{
|
||||
private List<DrawableShape> shapes = new List<DrawableShape>();
|
||||
|
||||
public DrawManager(BasePlugin plugin)
|
||||
{
|
||||
plugin.AddTimer(1f, Tick, TimerFlags.REPEAT);
|
||||
}
|
||||
|
||||
private void Tick()
|
||||
{
|
||||
shapes.ForEach(s => s.Tick());
|
||||
}
|
||||
|
||||
public void DrawShape(DrawableShape shape, float tickRate = 0f)
|
||||
{
|
||||
}
|
||||
|
||||
public List<DrawableShape> GetShapes()
|
||||
{
|
||||
return shapes;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>Jailbreak.Drawable</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
using CounterStrikeSharp.API.Core;
|
||||
|
||||
using Jailbreak.Config;
|
||||
using Jailbreak.Draw;
|
||||
using Jailbreak.English.Teams;
|
||||
using Jailbreak.English.Warden;
|
||||
using Jailbreak.Formatting.Languages;
|
||||
@@ -32,6 +33,7 @@ public class JailbreakServiceCollection : IPluginServiceCollection<Jailbreak>
|
||||
serviceCollection.AddJailbreakGeneric();
|
||||
serviceCollection.AddJailbreakWarden();
|
||||
serviceCollection.AddJailbreakTeams();
|
||||
serviceCollection.AddJailbreakDraw();
|
||||
|
||||
// Add in english localization
|
||||
serviceCollection.AddLanguage<Formatting.Languages.English>(config =>
|
||||
|
||||
Reference in New Issue
Block a user