Skip to content

Commit

Permalink
Remove unused class
Browse files Browse the repository at this point in the history
  • Loading branch information
Craxy committed Jul 27, 2017
1 parent 393f713 commit 4f02936
Showing 1 changed file with 2 additions and 52 deletions.
54 changes: 2 additions & 52 deletions src/ToggleTrafficLights/Tools/TrafficLights.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,7 @@

namespace Craxy.CitiesSkylines.ToggleTrafficLights.Tools
{
public class TrafficLightsTool
{
public void ChangeAll(TrafficLights.ChangeMode mode, bool showStats = false)
{
if (showStats)
{
ChangeAllAndShowStats(mode);
}
else
{
ChangeAllWithoutStats(mode);
}
}

public void ChangeAllAndShowStats(TrafficLights.ChangeMode mode)
{
_stats = TrafficLights.ChangeAll(mode);
}

public void ChangeAllWithoutStats(TrafficLights.ChangeMode mode)
{
TrafficLights.ChangeAllFast(mode);
}

public float ShowStatsForNSeconds { get; set; } = 3.0f;
private float _elapsedSeconds = 0.0f;
private TrafficLights.ChangedStatistics _stats = null;

public void DrawStats(float deltaTimeInSeconds)
{
if (_stats == null)
{
return;
}

_elapsedSeconds += deltaTimeInSeconds;
if (_elapsedSeconds >= ShowStatsForNSeconds)
{
_stats = null;
_elapsedSeconds = 0.0f;
}
else
{
// draw stats
GUILayout.BeginArea(new Rect());
}
}
}

public class TrafficLights
public static class TrafficLights
{
public enum ChangeMode : byte
{
Expand Down Expand Up @@ -241,8 +192,7 @@ public static void ChangeFast(ushort nodeId, ref NetNode node, ChangeMode mode)
{
return;
}

//todo: tests pre set faster than always set?

switch (mode)
{
case ChangeMode.Remove:
Expand Down

0 comments on commit 4f02936

Please sign in to comment.