class

Traffic::Vehicle

Inherits GSDL::Area < GSDL::Collidable < GSDL::Entity < GSDL::Tweenable < Reference < Object

Constructors

new(direction : GSDL::Direction, x : Int32 | Float32, y : Int32 | Float32)
Source

Instance methods

area_bounding_box

area bounding box for the trigger area

Source
asset_prefix
Source
base_speed_range
Source
blind_spot_box(target_x : Float32, target_y : Float32, aggressive = false) : GSDL::FRect
Source
calculate_path(graph : NodeGraph)
Source
clicked?(mx : Float32, my : Float32) : Bool
Source
collision_bounding_box

collision bounding box of the collidable object as an FRect

Source
direction
Source
direction=(dir : GSDL::Direction)
Source
distance_to(other_x : Float32, other_y : Float32)
Source
draw(draw : GSDL::Draw)
Source
draw_path(draw : GSDL::Draw, intersections : Array(Intersection))
Source
draw_status_overlay(draw : GSDL::Draw, th : Float32, cam_x : Float32, cam_y : Float32)
Source
draw_x

requires

Source
draw_y
Source
finished=(finished : Bool)
Source
finished?
Source
h_dims
Source
has_sirens?
Source
has_top?
Source
height
Source
lane_state
Source
lane_state=(lane_state : LaneState)
Source
look_ahead_box
Source
next_action
Source
next_action=(next_action : IntersectionAction)
Source
node_path
Source
node_path=(node_path : Array(Traffic::Node))
Source
off_screen?(map_width : Int32 | Float32, map_height : Int32 | Float32)
Source
paint_color
Source
paint_color=(paint_color : GSDL::Color)
Source
path
Source
priority?
Source
project_path_segments(intersections : Array(Intersection)) : Array(GSDL::FRect)
Source
select_target(graph : NodeGraph)
Source
setup_siren_animations(sprite : GSDL::AnimatedSprite, kind : Symbol)
Source
setup_top_animations(sprite : GSDL::AnimatedSprite, kind : Symbol)
Source
skips_red_lights?
Source
speed
Source
speed=(speed : Float32)
Source
target_node
Source
target_node=(target_node : Node | Nil)
Source
target_reached?
Source
tint_body?
Source
update(dt : Float32, map : GSDL::TileMap, intersections : Array(Intersection), all_vehicles : Array(Vehicle))
Source
update_special_behavior(dt : Float32, intersections : Array(Intersection), all_vehicles : Array(Vehicle))
Source
v_dims
Source
waiting=(waiting : Bool)
Source
waiting?
Source
width
Source
wrecked=(wrecked : Bool)
Source
wrecked?
Source