Class: HexagonPresenter
- Inherits:
-
Straightedge::Gosu::Presenter
- Object
- Straightedge::Presenter
- Straightedge::Gosu::Presenter
- HexagonPresenter
- Defined in:
- lib/straightedge/gosu/presenters/hexagon_presenter.rb
Instance Method Summary collapse
Methods inherited from Straightedge::Gosu::Presenter
Instance Method Details
#display(poly) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/straightedge/gosu/presenters/hexagon_presenter.rb', line 2 def display(poly) c = Straightedge::Colors.hex_value(poly.color) @surface.draw_triangle(*colorize(poly.left_triangle, c)) @surface.draw_quad( *colorize(poly.center_quad, c)) @surface.draw_triangle(*colorize(poly.right_triangle, c)) end |