mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +00:00
CS:GO and Audio Visualization fixes
This commit is contained in:
parent
acb32f13de
commit
fe9a2db983
@ -4,6 +4,7 @@
|
|||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="userSettings"
|
<sectionGroup name="userSettings"
|
||||||
type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<section name="Artemis.Modules.Effects.AudioVisualizer.AudioVisualization" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="Artemis.Modules.Games.CounterStrike.CounterStrike" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Artemis.Modules.Games.CounterStrike.CounterStrike" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="Artemis.Settings.CounterStrike" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Artemis.Settings.CounterStrike" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
<section name="Artemis.Settings.VolumeDisplay" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Artemis.Settings.VolumeDisplay" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
@ -28,6 +29,26 @@
|
|||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||||
</startup>
|
</startup>
|
||||||
<userSettings>
|
<userSettings>
|
||||||
|
<Artemis.Modules.Effects.AudioVisualizer.AudioVisualization>
|
||||||
|
<setting name="Sensitivity" serializeAs="String">
|
||||||
|
<value>4</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="Bars" serializeAs="String">
|
||||||
|
<value>21</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="FromBottom" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="FadeSpeed" serializeAs="String">
|
||||||
|
<value>3</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="MainColor" serializeAs="String">
|
||||||
|
<value>#FF0000FF</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="SecondaryColor" serializeAs="String">
|
||||||
|
<value>#FF1E90FF</value>
|
||||||
|
</setting>
|
||||||
|
</Artemis.Modules.Effects.AudioVisualizer.AudioVisualization>
|
||||||
<Artemis.Modules.Games.CounterStrike.CounterStrike>
|
<Artemis.Modules.Games.CounterStrike.CounterStrike>
|
||||||
<setting name="GameDirectory" serializeAs="String">
|
<setting name="GameDirectory" serializeAs="String">
|
||||||
<value />
|
<value />
|
||||||
|
|||||||
@ -221,8 +221,8 @@
|
|||||||
<Compile Include="Utilities\Audio\FftEventArgs.cs" />
|
<Compile Include="Utilities\Audio\FftEventArgs.cs" />
|
||||||
<Compile Include="Utilities\Audio\SampleAggregator.cs" />
|
<Compile Include="Utilities\Audio\SampleAggregator.cs" />
|
||||||
<Compile Include="Utilities\ColorHelpers.cs" />
|
<Compile Include="Utilities\ColorHelpers.cs" />
|
||||||
<Compile Include="Utilities\GameSense\GameDataReceivedEventArgs.cs" />
|
<Compile Include="Utilities\GameState\GameDataReceivedEventArgs.cs" />
|
||||||
<Compile Include="Utilities\GameSense\GameSenseWebServer.cs" />
|
<Compile Include="Utilities\GameState\GameStateWebServer.cs" />
|
||||||
<Compile Include="Utilities\Memory\Memory.cs" />
|
<Compile Include="Utilities\Memory\Memory.cs" />
|
||||||
<Compile Include="Utilities\Memory\MemoryHelpers.cs" />
|
<Compile Include="Utilities\Memory\MemoryHelpers.cs" />
|
||||||
<Compile Include="Utilities\Memory\Win32.cs" />
|
<Compile Include="Utilities\Memory\Win32.cs" />
|
||||||
|
|||||||
@ -7,7 +7,7 @@ using System.Threading;
|
|||||||
using Artemis.Events;
|
using Artemis.Events;
|
||||||
using Artemis.KeyboardProviders;
|
using Artemis.KeyboardProviders;
|
||||||
using Artemis.Settings;
|
using Artemis.Settings;
|
||||||
using Artemis.Utilities.GameSense;
|
using Artemis.Utilities.GameState;
|
||||||
using Artemis.Utilities.Memory;
|
using Artemis.Utilities.Memory;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ namespace Artemis.Models
|
|||||||
{
|
{
|
||||||
EffectModels = new List<EffectModel>();
|
EffectModels = new List<EffectModel>();
|
||||||
KeyboardProviders = ProviderHelper.GetKeyboardProviders();
|
KeyboardProviders = ProviderHelper.GetKeyboardProviders();
|
||||||
GameSenseWebServer = new GameSenseWebServer();
|
GameStateWebServer = new GameStateWebServer();
|
||||||
|
|
||||||
Events = events;
|
Events = events;
|
||||||
Fps = 25;
|
Fps = 25;
|
||||||
@ -38,7 +38,7 @@ namespace Artemis.Models
|
|||||||
public KeyboardProvider ActiveKeyboard { get; set; }
|
public KeyboardProvider ActiveKeyboard { get; set; }
|
||||||
public List<KeyboardProvider> KeyboardProviders { get; set; }
|
public List<KeyboardProvider> KeyboardProviders { get; set; }
|
||||||
|
|
||||||
public GameSenseWebServer GameSenseWebServer { get; set; }
|
public GameStateWebServer GameStateWebServer { get; set; }
|
||||||
public IEventAggregator Events { get; set; }
|
public IEventAggregator Events { get; set; }
|
||||||
public int Fps { get; set; }
|
public int Fps { get; set; }
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get; set; }
|
||||||
@ -50,7 +50,7 @@ namespace Artemis.Models
|
|||||||
LoadLastKeyboard();
|
LoadLastKeyboard();
|
||||||
|
|
||||||
// Start the webserver
|
// Start the webserver
|
||||||
GameSenseWebServer.Start();
|
GameStateWebServer.Start();
|
||||||
|
|
||||||
// Load last non-game effect and enable
|
// Load last non-game effect and enable
|
||||||
LoadLastEffect();
|
LoadLastEffect();
|
||||||
|
|||||||
@ -49,13 +49,13 @@ namespace Artemis.Modules.Effects.AudioVisualizer {
|
|||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("1")]
|
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||||
public int Spread {
|
public bool FromBottom {
|
||||||
get {
|
get {
|
||||||
return ((int)(this["Spread"]));
|
return ((bool)(this["FromBottom"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["Spread"] = value;
|
this["FromBottom"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Artemis.Modules.Effects.AudioVisualizer" GeneratedClassName="AudioVisualization">
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"
|
|
||||||
GeneratedClassNamespace="Artemis.Settings" GeneratedClassName="AudioVisualization">
|
|
||||||
<Profiles />
|
<Profiles />
|
||||||
<Settings>
|
<Settings>
|
||||||
<Setting Name="Sensitivity" Type="System.Int32" Scope="User">
|
<Setting Name="Sensitivity" Type="System.Int32" Scope="User">
|
||||||
@ -10,8 +8,8 @@
|
|||||||
<Setting Name="Bars" Type="System.Int32" Scope="User">
|
<Setting Name="Bars" Type="System.Int32" Scope="User">
|
||||||
<Value Profile="(Default)">21</Value>
|
<Value Profile="(Default)">21</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="Spread" Type="System.Int32" Scope="User">
|
<Setting Name="FromBottom" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">1</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="FadeSpeed" Type="System.Int32" Scope="User">
|
<Setting Name="FadeSpeed" Type="System.Int32" Scope="User">
|
||||||
<Value Profile="(Default)">3</Value>
|
<Value Profile="(Default)">3</Value>
|
||||||
|
|||||||
@ -18,6 +18,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
|
|||||||
private readonly SampleAggregator _sampleAggregator = new SampleAggregator(FftLength);
|
private readonly SampleAggregator _sampleAggregator = new SampleAggregator(FftLength);
|
||||||
private bool _generating;
|
private bool _generating;
|
||||||
private IWaveIn _waveIn;
|
private IWaveIn _waveIn;
|
||||||
|
private bool _previousFromBottom;
|
||||||
|
|
||||||
public AudioVisualizerModel(AudioVisualizerSettings settings)
|
public AudioVisualizerModel(AudioVisualizerSettings settings)
|
||||||
{
|
{
|
||||||
@ -96,6 +97,9 @@ namespace Artemis.Modules.Effects.AudioVisualizer
|
|||||||
// Clear the rectangle cache on Bars settings change
|
// Clear the rectangle cache on Bars settings change
|
||||||
if (SoundRectangles.Count != Settings.Bars)
|
if (SoundRectangles.Count != Settings.Bars)
|
||||||
SoundRectangles.Clear();
|
SoundRectangles.Clear();
|
||||||
|
if (Settings.FromBottom != _previousFromBottom)
|
||||||
|
SoundRectangles.Clear();
|
||||||
|
_previousFromBottom = Settings.FromBottom;
|
||||||
|
|
||||||
// Parse spectrum data
|
// Parse spectrum data
|
||||||
for (var i = 0; i < Settings.Bars; i++)
|
for (var i = 0; i < Settings.Bars; i++)
|
||||||
@ -123,6 +127,9 @@ namespace Artemis.Modules.Effects.AudioVisualizer
|
|||||||
// Apply Bars setting
|
// Apply Bars setting
|
||||||
SoundRectangles[i].X = (int) Math.Ceiling((double) Lines/Settings.Bars)*i;
|
SoundRectangles[i].X = (int) Math.Ceiling((double) Lines/Settings.Bars)*i;
|
||||||
SoundRectangles[i].Width = (int) Math.Ceiling((double) Lines/Settings.Bars);
|
SoundRectangles[i].Width = (int) Math.Ceiling((double) Lines/Settings.Bars);
|
||||||
|
|
||||||
|
if (Settings.FromBottom)
|
||||||
|
SoundRectangles[i].Y = (Scale*8) - SoundRectangles[i].Height;
|
||||||
}
|
}
|
||||||
_generating = false;
|
_generating = false;
|
||||||
}
|
}
|
||||||
@ -144,6 +151,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
|
|||||||
foreach (var soundRectangle in SoundRectangles)
|
foreach (var soundRectangle in SoundRectangles)
|
||||||
soundRectangle.Draw(g);
|
soundRectangle.Draw(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
_generating = false;
|
_generating = false;
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
|
|||||||
|
|
||||||
public int Sensitivity { get; set; }
|
public int Sensitivity { get; set; }
|
||||||
public int Bars { get; set; }
|
public int Bars { get; set; }
|
||||||
public int Spread { get; set; }
|
public bool FromBottom { get; set; }
|
||||||
public int FadeSpeed { get; set; }
|
public int FadeSpeed { get; set; }
|
||||||
public Color MainColor { get; set; }
|
public Color MainColor { get; set; }
|
||||||
public Color SecondaryColor { get; set; }
|
public Color SecondaryColor { get; set; }
|
||||||
@ -22,7 +22,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
|
|||||||
{
|
{
|
||||||
Sensitivity = AudioVisualization.Default.Sensitivity;
|
Sensitivity = AudioVisualization.Default.Sensitivity;
|
||||||
Bars = AudioVisualization.Default.Bars;
|
Bars = AudioVisualization.Default.Bars;
|
||||||
Spread = AudioVisualization.Default.Spread;
|
FromBottom = AudioVisualization.Default.FromBottom;
|
||||||
FadeSpeed = AudioVisualization.Default.FadeSpeed;
|
FadeSpeed = AudioVisualization.Default.FadeSpeed;
|
||||||
MainColor = AudioVisualization.Default.MainColor;
|
MainColor = AudioVisualization.Default.MainColor;
|
||||||
SecondaryColor = AudioVisualization.Default.SecondaryColor;
|
SecondaryColor = AudioVisualization.Default.SecondaryColor;
|
||||||
@ -32,7 +32,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
|
|||||||
{
|
{
|
||||||
AudioVisualization.Default.Sensitivity = Sensitivity;
|
AudioVisualization.Default.Sensitivity = Sensitivity;
|
||||||
AudioVisualization.Default.Bars = Bars;
|
AudioVisualization.Default.Bars = Bars;
|
||||||
AudioVisualization.Default.Spread = Spread;
|
AudioVisualization.Default.FromBottom = FromBottom;
|
||||||
AudioVisualization.Default.FadeSpeed = FadeSpeed;
|
AudioVisualization.Default.FadeSpeed = FadeSpeed;
|
||||||
AudioVisualization.Default.MainColor = MainColor;
|
AudioVisualization.Default.MainColor = MainColor;
|
||||||
AudioVisualization.Default.SecondaryColor = SecondaryColor;
|
AudioVisualization.Default.SecondaryColor = SecondaryColor;
|
||||||
@ -44,7 +44,7 @@ namespace Artemis.Modules.Effects.AudioVisualizer
|
|||||||
{
|
{
|
||||||
Sensitivity = 4;
|
Sensitivity = 4;
|
||||||
Bars = 21;
|
Bars = 21;
|
||||||
Spread = 1;
|
FromBottom = true;
|
||||||
FadeSpeed = 3;
|
FadeSpeed = 3;
|
||||||
MainColor = Color.FromArgb(255, 0, 0, 255);
|
MainColor = Color.FromArgb(255, 0, 0, 255);
|
||||||
SecondaryColor = Color.FromArgb(255, 30, 144, 255);
|
SecondaryColor = Color.FromArgb(255, 30, 144, 255);
|
||||||
|
|||||||
@ -85,6 +85,14 @@
|
|||||||
SmallChange="7"
|
SmallChange="7"
|
||||||
IsSnapToTickEnabled="True" />
|
IsSnapToTickEnabled="True" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Row="3"
|
||||||
|
Grid.Column="0"
|
||||||
|
HorizontalAlignment="Left">
|
||||||
|
<controls:ToggleSwitch IsChecked="{Binding Path=AudioVisualizerSettings.FromBottom, Mode=TwoWay}"
|
||||||
|
Header="Origin"
|
||||||
|
OnLabel="Bottom" OffLabel="Top"
|
||||||
|
Margin="5,3,0,0" Width="125" />
|
||||||
|
</StackPanel>
|
||||||
<!-- Fadeout slider -->
|
<!-- Fadeout slider -->
|
||||||
<StackPanel Grid.Row="3"
|
<StackPanel Grid.Row="3"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
|||||||
@ -6,7 +6,7 @@ using System.Drawing.Drawing2D;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Artemis.Models;
|
using Artemis.Models;
|
||||||
using Artemis.Utilities;
|
using Artemis.Utilities;
|
||||||
using Artemis.Utilities.GameSense;
|
using Artemis.Utilities.GameState;
|
||||||
using Artemis.Utilities.Keyboard;
|
using Artemis.Utilities.Keyboard;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
@ -18,7 +18,6 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
private readonly CounterStrikeSettings _counterStrikeSettings;
|
private readonly CounterStrikeSettings _counterStrikeSettings;
|
||||||
private readonly MainModel _mainModel;
|
private readonly MainModel _mainModel;
|
||||||
|
|
||||||
// TODO: Make functional (CS' new gamestate intergration broke this)
|
|
||||||
public CounterStrikeModel(CounterStrikeSettings counterStrikeSettings, MainModel mainModel)
|
public CounterStrikeModel(CounterStrikeSettings counterStrikeSettings, MainModel mainModel)
|
||||||
{
|
{
|
||||||
_counterStrikeSettings = counterStrikeSettings;
|
_counterStrikeSettings = counterStrikeSettings;
|
||||||
@ -50,12 +49,12 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
_mainModel.GameSenseWebServer.GameDataReceived -= HandleGameData;
|
_mainModel.GameStateWebServer.GameDataReceived -= HandleGameData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Enable()
|
public override void Enable()
|
||||||
{
|
{
|
||||||
_mainModel.GameSenseWebServer.GameDataReceived += HandleGameData;
|
_mainModel.GameStateWebServer.GameDataReceived += HandleGameData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update()
|
public override void Update()
|
||||||
@ -81,7 +80,7 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var health = CsJson["player"]["state"]["health"].Value<int>();
|
var health = CsJson["player"]["state"]["health"].Value<int>();
|
||||||
if (health > 25)
|
if (health > 25 || health < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TeamRect.Colors = new List<Color> {Color.Red, Color.DarkOrange, Color.Red, Color.DarkOrange};
|
TeamRect.Colors = new List<Color> {Color.Red, Color.DarkOrange, Color.Red, Color.DarkOrange};
|
||||||
@ -120,7 +119,7 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var t1 = Color.FromArgb(255, 255, 129, 0);
|
var t1 = Color.FromArgb(255, 255, 129, 0);
|
||||||
var t2 = Color.FromArgb(255, 255, 89, 0);
|
var t2 = Color.FromArgb(255, 255, 170, 125);
|
||||||
|
|
||||||
var ct1 = Color.FromArgb(255, 203, 238, 255);
|
var ct1 = Color.FromArgb(255, 203, 238, 255);
|
||||||
var ct2 = Color.FromArgb(255, 0, 173, 255);
|
var ct2 = Color.FromArgb(255, 0, 173, 255);
|
||||||
|
|||||||
@ -59,7 +59,7 @@ namespace Artemis.Modules.Games.CounterStrike
|
|||||||
return;
|
return;
|
||||||
if (Directory.Exists(CounterStrikeSettings.GameDirectory + "/csgo/cfg"))
|
if (Directory.Exists(CounterStrikeSettings.GameDirectory + "/csgo/cfg"))
|
||||||
{
|
{
|
||||||
var cfgFile = Properties.Resources.gamestateConfigFileCsGo.Replace("{{port}}", MainModel.GameSenseWebServer.Port.ToString());
|
var cfgFile = Properties.Resources.gamestateConfigFileCsGo.Replace("{{port}}", MainModel.GameStateWebServer.Port.ToString());
|
||||||
File.WriteAllText(CounterStrikeSettings.GameDirectory + "/csgo/cfg/gamestate_integration_artemis.cfg", cfgFile);
|
File.WriteAllText(CounterStrikeSettings.GameDirectory + "/csgo/cfg/gamestate_integration_artemis.cfg", cfgFile);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
{
|
{
|
||||||
public class Witcher3Model : GameModel
|
public class Witcher3Model : GameModel
|
||||||
{
|
{
|
||||||
|
// TODO: Update for 1.12
|
||||||
public Witcher3Model(RocketLeagueSettings settings)
|
public Witcher3Model(RocketLeagueSettings settings)
|
||||||
{
|
{
|
||||||
Name = "Witcher3";
|
Name = "Witcher3";
|
||||||
@ -19,8 +20,7 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
Scale = 4;
|
Scale = 4;
|
||||||
|
|
||||||
Settings = settings;
|
Settings = settings;
|
||||||
SignRect = new KeyboardRectangle(Scale, 0, 0, 84, 24, new List<Color> {Color.Blue, Color.Red},
|
SignRect = new KeyboardRectangle(Scale, 0, 0, 84, 24, new List<Color>(), LinearGradientMode.Horizontal)
|
||||||
LinearGradientMode.Horizontal)
|
|
||||||
{
|
{
|
||||||
Rotate = true,
|
Rotate = true,
|
||||||
LoopSpeed = 0.5
|
LoopSpeed = 0.5
|
||||||
@ -69,19 +69,43 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
// Aard
|
// Aard
|
||||||
SignRect.Colors = new List<Color> {Color.DeepSkyBlue, Color.Blue, Color.DeepSkyBlue, Color.Blue};
|
SignRect.Colors = new List<Color>
|
||||||
|
{
|
||||||
|
Color.DeepSkyBlue,
|
||||||
|
Color.Blue,
|
||||||
|
Color.DeepSkyBlue,
|
||||||
|
Color.Blue
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// Yrden
|
// Yrden
|
||||||
SignRect.Colors = new List<Color> {Color.Purple, Color.DeepPink, Color.Purple, Color.DeepPink};
|
SignRect.Colors = new List<Color>
|
||||||
|
{
|
||||||
|
Color.Purple,
|
||||||
|
Color.DeepPink,
|
||||||
|
Color.Purple,
|
||||||
|
Color.DeepPink
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// Igni
|
// Igni
|
||||||
SignRect.Colors = new List<Color> {Color.DarkOrange, Color.Red, Color.DarkOrange, Color.Red};
|
SignRect.Colors = new List<Color>
|
||||||
|
{
|
||||||
|
Color.DarkOrange,
|
||||||
|
Color.Red,
|
||||||
|
Color.DarkOrange,
|
||||||
|
Color.Red
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// Quen
|
// Quen
|
||||||
SignRect.Colors = new List<Color> {Color.DarkOrange, Color.Yellow, Color.DarkOrange, Color.Yellow};
|
SignRect.Colors = new List<Color>
|
||||||
|
{
|
||||||
|
Color.DarkOrange,
|
||||||
|
Color.Yellow,
|
||||||
|
Color.DarkOrange,
|
||||||
|
Color.Yellow
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
// Axii
|
// Axii
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
"Artemis"
|
"Artemis"
|
||||||
{
|
{
|
||||||
"uri" "127.0.0.1:{{port}}/csgo_game_event"
|
"uri" "http://127.0.0.1:{{port}}/csgo_game_event"
|
||||||
"timeout" "5.0"
|
"timeout" "5.0"
|
||||||
"buffer" "0.1"
|
"buffer" "0.1"
|
||||||
"throttle" "0.1"
|
"throttle" "0.1"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Artemis.Utilities.GameSense
|
namespace Artemis.Utilities.GameState
|
||||||
{
|
{
|
||||||
public class GameDataReceivedEventArgs : EventArgs
|
public class GameDataReceivedEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
@ -6,16 +6,16 @@ using System.Text;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Artemis.Utilities.GameSense
|
namespace Artemis.Utilities.GameState
|
||||||
{
|
{
|
||||||
public class GameSenseWebServer
|
public class GameStateWebServer
|
||||||
{
|
{
|
||||||
public delegate void GameDataReceivedEventHandler(
|
public delegate void GameDataReceivedEventHandler(
|
||||||
object sender, GameDataReceivedEventArgs gameDataReceivedEventArgs);
|
object sender, GameDataReceivedEventArgs gameDataReceivedEventArgs);
|
||||||
|
|
||||||
private readonly HttpListener _listener = new HttpListener();
|
private readonly HttpListener _listener = new HttpListener();
|
||||||
|
|
||||||
public GameSenseWebServer()
|
public GameStateWebServer()
|
||||||
{
|
{
|
||||||
Start();
|
Start();
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ namespace Artemis.Utilities.GameSense
|
|||||||
if (!Directory.Exists(path))
|
if (!Directory.Exists(path))
|
||||||
Directory.CreateDirectory(path);
|
Directory.CreateDirectory(path);
|
||||||
|
|
||||||
var content = "{\"address\":\"localhost:" + Port + "\"}";
|
var content = "{\"address\":\"127.0.0.1:" + Port + "\"}";
|
||||||
File.WriteAllText(path + @"\coreProps.json", content);
|
File.WriteAllText(path + @"\coreProps.json", content);
|
||||||
}
|
}
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user