mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-15 15:52:34 +00:00
Extracted movement and turret into 'components' that entity get add to its self when defined
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
IMICRTS::Entity.define_entity(:tank, :unit, 800, "Attacks ground targets") do |entity|
|
||||
entity.has(:movement)
|
||||
entity.has(:turret)
|
||||
|
||||
entity.radius = 14
|
||||
entity.movement = :ground
|
||||
entity.max_health = 100.0
|
||||
|
||||
entity.shell_image = "vehicles/tank/tank_shell.png"
|
||||
|
||||
entity.turret_shell_image = "vehicles/tank/tank_turret_shell.png"
|
||||
entity.component(:turret).shell_image = "vehicles/tank/tank_turret_shell.png"
|
||||
entity.component(:turret).center.y = 0.4
|
||||
|
||||
entity.on_tick do
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user