Closed jbtule closed 9 years ago
left = CP::Shape::Segment.new... right = CP::Shape::Segment.new... etc...
put them into a hash ->
boundaries = { left_edge: CP::Shape::Segment.new... right_edge: CP::Shape::Segment.new... etc...
each_value
boundaries.each_value {|value| value.sensor = true }
each
boundaries.each {|key, value| value.collision_type = key }
@space
each_key
put them into a hash ->
each_value
syntax to set the shapes as sensors on all the boundary shapes at onceeach
syntax to set the collision type such aseach_value
syntax to add each boundary shape to@space
each_key
syntax to add the collision handler for each boundary symbol and player