Building units now uses orders 😃

This commit is contained in:
2021-01-01 14:25:44 -06:00
parent 74458dbfd0
commit 5f301337b4
35 changed files with 171 additions and 100 deletions

View File

@@ -3,6 +3,7 @@ class IMICRTS
def setup
@waypoint = @parent.position.clone
@waypoint.y += @parent.director.map.tile_size
@waypoint_color = 0xffffff00
end
def set(vector)
@@ -17,11 +18,11 @@ class IMICRTS
return unless @parent.player.selected_entities.include?(@parent)
Gosu.draw_line(
@parent.position.x, @parent.position.y, @parent.player.color,
@waypoint.x, @waypoint.y, @parent.player.color, ZOrder::ENTITY_GIZMOS
@parent.position.x, @parent.position.y, @waypoint_color,
@waypoint.x, @waypoint.y, @waypoint_color, ZOrder::ENTITY_GIZMOS
)
Gosu.draw_circle(@waypoint.x, @waypoint.y, 4, 9, @parent.player.color, ZOrder::ENTITY_GIZMOS)
Gosu.draw_circle(@waypoint.x, @waypoint.y, 4, 9, @waypoint_color, ZOrder::ENTITY_GIZMOS)
end
end
end