-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API update for compatibility with NC/DCR/HUT * TrafficLights/JunctionRestrictions: updated API * LaneEndTransitionGroup : Added Bicycle and Pedestrian for future proofing. * Expose Road sign theme in API.
- Loading branch information
1 parent
f72ad76
commit 8feadbb
Showing
13 changed files
with
135 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace TrafficManager.UI { | ||
using TrafficManager.API.UI; | ||
using TrafficManager.UI.Textures; | ||
|
||
public class UIFactory : IUIFactory { | ||
public static IUIFactory Instance = new UIFactory(); | ||
|
||
public ITheme ActiveTheme => RoadSignThemeManager.ActiveTheme; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace TrafficManager.API.Traffic.Enums { | ||
public enum JunctionRestrictionFlags { | ||
AllowUTurn = 1 << 0, | ||
AllowNearTurnOnRed = 1 << 1, | ||
AllowFarTurnOnRed = 1 << 2, | ||
AllowForwardLaneChange = 1 << 3, | ||
AllowEnterWhenBlocked = 1 << 4, | ||
AllowPedestrianCrossing = 1 << 5, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace TrafficManager.API.UI { | ||
using TrafficManager.API.Traffic.Enums; | ||
using UnityEngine; | ||
|
||
/// <summary> | ||
/// gets the texture for overlay sprite for each traffic rule according to the current theme. | ||
/// </summary> | ||
public interface ITheme { | ||
Texture2D JunctionRestriction(JunctionRestrictionFlags rule, bool allowed); | ||
|
||
Texture2D Parking(bool allowed); | ||
|
||
Texture2D Priority(PriorityType p); | ||
|
||
Texture2D VehicleRestriction(ExtVehicleType type, bool allow); | ||
|
||
Texture2D TrafficLightIcon(ushort nodeId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace TrafficManager.API.UI { | ||
|
||
/// <summary> | ||
/// gets the texture for overlay sprite for each traffic rule according to the current theme. | ||
/// </summary> | ||
public interface IUIFactory { | ||
ITheme ActiveTheme { get; } | ||
} | ||
} |