C# Class TrafficManager.UI.TrafficLightTool

Inheritance: DefaultTool
显示文件 Open project: Katalyst6/CSL.TransitAddonMod

Public Properties

Property Type Description
SelectedNodeIndexes List

Public Methods

Method Description
AddTimedNodes ( ) : void
RenderGeometry ( RenderManager cameraInfo ) : void
RenderOverlay ( RenderManager cameraInfo ) : void

Renders overlays (node selection, segment selection, etc.)

SetToolMode ( ToolMode mode ) : void
SimulationStep ( ) : void
SwitchManual ( ) : bool
getToolMode ( ) : ToolMode

Protected Methods

Method Description
Awake ( ) : void
OnDisable ( ) : void
OnEnable ( ) : void
OnToolGUI ( Event e ) : void
OnToolUpdate ( ) : void

Primarily handles click events on hovered nodes/segments

Private Methods

Method Description
AddPrioritySignsToolMode ( NetNode node ) : void
AddSelectedNode ( ushort node ) : void
AddSelectedSegment ( ushort segment ) : void
CalculateNodePositionForSegment ( NetNode node, NetSegment segment ) : Vector3
CalculateNodePositionForSegment ( NetNode node, int segmentId ) : Vector3
ClearSelectedNodes ( ) : void
CreateZoneBlocks ( int segment, NetSegment &data, NetInfo info ) : void
DisableManual ( ) : void
DisableTimed ( ) : void
ForwardArrowLightMode ( int segmentId, float lightWidth, bool hasRightSegment, Vector3 screenPos, float pedestrianWidth, float zoom, float lightHeight, CustomSegmentLight segmentDict, bool hoveredSegment ) : bool
GetHoveredSegment ( Rect myRect1, int segmentId, bool hoveredSegment, CustomSegmentLight segmentDict ) : bool
GetNumberOfMainRoads ( ushort nodeId, NetNode &node ) : int
IsMouseOver ( Rect boundingBox ) : bool
IsNodeSelected ( ushort node ) : bool
IsPedestrianLightHovered ( Rect myRect3, int segmentId, bool hoveredSegment, CustomSegmentLights segmentLights ) : bool
IsSegmentSelected ( ushort segment ) : bool
LaneChangeToolMode ( ) : void
LaneRestrictionsToolMode ( ) : void
LeftArrowLightMode ( int segmentId, float lightWidth, bool hasRightSegment, bool hasForwardSegment, Vector3 screenPos, float pedestrianWidth, float zoom, float lightHeight, CustomSegmentLight segmentDict, bool hoveredSegment ) : bool
LeftForwardRManualSegmentLightMode ( bool hasLeftSegment, int segmentId, Vector3 screenPos, float lightWidth, float pedestrianWidth, float zoom, float lightHeight, CustomSegmentLight segmentDict, bool hoveredSegment, bool hasForwardSegment, bool hasRightSegment ) : bool
MakeTex ( int width, int height, Color col ) : Texture2D
ManualSwitchToolMode ( NetNode &node ) : void
RemoveSelectedNode ( ushort node ) : void
RemoveSelectedSegment ( ushort segment ) : void
RenderCounter ( int segmentId, Vector3 screenPos, float modeWidth, float modeHeight, float zoom, CustomSegmentLights segmentLights, bool hoveredSegment ) : bool
RenderManualNodeOverlays ( RenderManager cameraInfo ) : void
RenderManualPedestrianLightSwitch ( float zoom, int segmentId, Vector3 screenPos, float lightWidth, CustomSegmentLights segmentLights, bool hoveredSegment ) : bool
RenderManualSelectionOverlay ( RenderManager cameraInfo ) : void
ResizeGUI ( Rect rect ) : Rect
RightArrowLightMode ( int segmentId, Vector3 screenPos, float lightWidth, float pedestrianWidth, float zoom, float lightHeight, CustomSegmentLight segmentDict, bool hoveredSegment ) : bool
RightForwardLSegmentLightMode ( int segmentId, Vector3 screenPos, float lightWidth, float pedestrianWidth, float zoom, float lightHeight, bool hasForwardSegment, bool hasLeftSegment, CustomSegmentLight segmentDict, bool hasRightSegment, bool hoveredSegment ) : bool
SetAlpha ( int segmentId, int buttonId ) : void
SimpleManualSegmentLightMode ( int segmentId, Vector3 screenPos, float lightWidth, float pedestrianWidth, float zoom, float lightHeight, CustomSegmentLight segmentDict, bool hoveredSegment ) : bool
SwitchTrafficLightToolMode ( NetNode &node ) : void
TimedLightAddNodeToolMode ( NetNode &node ) : void
TimedLightRemoveNodeToolMode ( NetNode &node ) : void
TimedLightSelectNodeToolMode ( NetNode &node ) : void
VehicleRestrictionsToolMode ( ) : void
_guiCitizens ( ) : void
_guiLaneChange ( ) : void
_guiLaneChangeWindow ( int num ) : void
_guiLaneRestrictions ( ) : void
_guiLaneRestrictionsOneWayWindow ( int num ) : void
_guiLanes ( NetSegment &segment, NetInfo &segmentInfo ) : void

Displays lane ids over lanes

_guiManualTrafficLights ( ) : void
_guiNodes ( ) : void

Displays node ids over nodes

_guiPrioritySigns ( bool viewOnly ) : void
_guiSegments ( ) : void

Displays segment ids over segments

_guiSpeedLimits ( ) : void
_guiSpeedLimitsWindow ( int num ) : void
_guiTimedControlPanel ( int num ) : void
_guiTimedTrafficLights ( ) : void
_guiTimedTrafficLightsNode ( ) : void
_guiTimedTrafficLightsNodeWindow ( int num ) : void
_guiVehicles ( ) : void

Displays vehicle ids over vehicles

_renderOverlayDraw ( RenderManager cameraInfo, Bezier3 bezier, Color color ) : void
_renderOverlayDraw ( RenderManager cameraInfo, Color color, Vector3 position, float width, bool alpha ) : void
_renderOverlayLaneChange ( RenderManager cameraInfo ) : void
_renderOverlayLaneRestrictions ( RenderManager cameraInfo ) : void
_renderOverlayManual ( RenderManager cameraInfo ) : void
_renderOverlaySwitch ( RenderManager cameraInfo, bool warning = false ) : void
_renderOverlayTimedSelectNodes ( RenderManager cameraInfo, bool onlySelected = false ) : void
_renderOverlayVehicleRestrictions ( RenderManager cameraInfo ) : void
_switchTrafficLights ( ) : void
calculateSegmentCenterByDir ( ushort segmentId, Vector3>.Dictionary segmentCenterByDir ) : void
checkClicked ( ) : bool
determineHoveredElements ( ) : bool
drawForwardLeftLightTexture ( RoadBaseAI state, Rect rect ) : void
drawForwardRightLightTexture ( RoadBaseAI state, Rect rect ) : void
drawLeftLightTexture ( RoadBaseAI state, Rect rect ) : void
drawMainLightTexture ( RoadBaseAI state, Rect rect ) : void
drawRightLightTexture ( RoadBaseAI state, Rect rect ) : void
drawSpeedLimitHandles ( ushort segmentId, bool viewOnly ) : bool
drawStraightLightTexture ( RoadBaseAI state, Rect rect ) : void
drawVehicleRestrictionHandles ( ushort segmentId, bool viewOnly ) : bool
getSegmentNumVehicleLanes ( ushort segmentId, ushort nodeId, int &numDirections ) : int
getSortedVehicleLanes ( ushort segmentId, NetInfo info, ushort nodeId ) : List
getWaitFlowBalanceInfo ( ) : string
makeFlowPolicySlider ( ) : void
showTimedLightIcons ( ) : void
showTooltip ( String text, Vector3 position ) : void

Method Details

AddTimedNodes() public method

public AddTimedNodes ( ) : void
return void

Awake() protected method

protected Awake ( ) : void
return void

OnDisable() protected method

protected OnDisable ( ) : void
return void

OnEnable() protected method

protected OnEnable ( ) : void
return void

OnToolGUI() protected method

protected OnToolGUI ( Event e ) : void
e UnityEngine.Event
return void

OnToolUpdate() protected method

Primarily handles click events on hovered nodes/segments
protected OnToolUpdate ( ) : void
return void

RenderGeometry() public method

public RenderGeometry ( RenderManager cameraInfo ) : void
cameraInfo RenderManager
return void

RenderOverlay() public method

Renders overlays (node selection, segment selection, etc.)
public RenderOverlay ( RenderManager cameraInfo ) : void
cameraInfo RenderManager
return void

SetToolMode() public static method

public static SetToolMode ( ToolMode mode ) : void
mode ToolMode
return void

SimulationStep() public method

public SimulationStep ( ) : void
return void

SwitchManual() public method

public SwitchManual ( ) : bool
return bool

getToolMode() public static method

public static getToolMode ( ) : ToolMode
return ToolMode

Property Details

SelectedNodeIndexes public_oe static_oe property

public static List SelectedNodeIndexes
return List