Added construction complete order, added jeep overlay image to show windscreen, added rotors component for helicopter; more work needed, replaced all build and vehicle assets with ones that are 6x larger to prevent pixelization when zoomed in, misc.

This commit is contained in:
2021-01-08 12:41:04 -06:00
parent 0d449b9375
commit a3c3939f50
45 changed files with 149 additions and 66 deletions

View File

@@ -48,7 +48,7 @@ IMICRTS::Entity.define_entity(:construction_yard, :building, 2_000, 310, "Provid
entity.on_tick do
if entity.component(:building).data.state == :idle
if entity.component(:building).construction_complete?
item = entity.component(:build_queue).queue.first
entity.particle_emitters.each_with_index do |emitter, i|

View File

@@ -37,10 +37,12 @@ IMICRTS::Entity.define_entity(:war_factory, :building, 2_000, 310, "Builds and r
entity.particle_emitters << IMICRTS::SmokeEmitter.new(position: p2, emitting: false)
entity.on_tick do
item = entity.component(:build_queue).queue.first
if entity.component(:building).construction_complete?
item = entity.component(:build_queue).queue.first
entity.particle_emitters.each do |pe|
pe.emitting = !!item
entity.particle_emitters.each do |pe|
pe.emitting = !!item
end
end
end
end

View File

@@ -1,5 +1,6 @@
IMICRTS::Entity.define_entity(:helicopter, :unit, 400, 40, "Attacks ground targets") do |entity|
entity.has(:movement)
entity.has(:rotors)
entity.speed = 2.5
entity.radius = 14
@@ -10,6 +11,10 @@ IMICRTS::Entity.define_entity(:helicopter, :unit, 400, 40, "Attacks ground targe
entity.shell_image = "vehicles/helicopter/helicopter_shell.png"
entity.overlay_image = "vehicles/helicopter/helicopter_overlay.png"
entity.component(:rotors).body_image = "vehicles/helicopter/helicopter_rotors.png"
entity.component(:rotors).center.y = 0.593
entity.component(:rotors).speed = 500 / 60.0
entity.on_tick do
end
end

View File

@@ -9,9 +9,10 @@ IMICRTS::Entity.define_entity(:jeep, :unit, 400, 40, "Attacks ground targets") d
entity.body_image = "vehicles/jeep/jeep.png"
entity.shell_image = "vehicles/jeep/jeep_shell.png"
entity.overlay_image = "vehicles/jeep/jeep_overlay.png"
entity.component(:turret).shell_image = "vehicles/jeep/jeep_turret_shell.png"
entity.component(:turret).center.y = 0.3125
entity.component(:turret).center.y = 0.5
entity.on_tick do
end