Added building component, refactored components to have setup, draw, update and tick methods, added fencing for building construction area parimeter, misc other changes.

This commit is contained in:
2019-12-17 15:40:26 -06:00
parent ba40645e23
commit e5579f48f1
19 changed files with 404 additions and 24 deletions

View File

@@ -7,6 +7,7 @@ tiles = [
]
IMICRTS::Entity.define_entity(:barracks, :building, 400, "Builds and soldiers", tiles) do |entity|
entity.has(:building)
entity.has(:build_queue)
entity.radius = 44

View File

@@ -7,6 +7,7 @@ tiles = [
]
IMICRTS::Entity.define_entity(:construction_yard, :building, 2_000, "Provides radar and builds construction workers", tiles) do |entity|
entity.has(:building)
entity.has(:build_queue)
entity.has(:sidebar_actions)
entity.component(:sidebar_actions).add(:add_to_build_queue, {entity: :construction_worker})

View File

@@ -7,6 +7,7 @@ tiles = [
]
IMICRTS::Entity.define_entity(:helipad, :building, 1_000, "Builds and rearms helicopters", tiles) do |entity|
entity.has(:building)
entity.has(:build_queue)
entity.has(:sidebar_actions)
entity.component(:sidebar_actions).add(:add_to_build_queue, {entity: :helicopter})

View File

@@ -7,6 +7,8 @@ tiles = [
]
IMICRTS::Entity.define_entity(:power_plant, :building, 800, "Generates power", tiles) do |entity|
entity.has(:building)
entity.radius = 24
entity.max_health = 100.0

View File

@@ -7,6 +7,8 @@ tiles = [
]
IMICRTS::Entity.define_entity(:refinery, :building, 1_400, "Generates credits", tiles) do |entity|
entity.has(:building)
entity.radius = 44
entity.max_health = 100.0

View File

@@ -7,6 +7,7 @@ tiles = [
]
IMICRTS::Entity.define_entity(:war_factory, :building, 2_000, "Builds units", tiles) do |entity|
entity.has(:building)
entity.has(:build_queue)
entity.has(:sidebar_actions)
entity.component(:sidebar_actions).add(:add_to_build_queue, {entity: :jeep})