Further improvements to place entity/building tool

This commit is contained in:
2019-11-28 09:17:18 -06:00
parent e3d1a84efa
commit 81461778df
3 changed files with 70 additions and 7 deletions

View File

@@ -107,7 +107,7 @@ class IMICRTS
def spawn_entity(player_id:, name:, position:)
_player = player(player_id)
_player.entities << Entity.new(
ent = Entity.new(
name: name,
director: self,
player: _player,
@@ -115,6 +115,9 @@ class IMICRTS
position: position,
angle: 0
)
_player.entities << ent
return ent
end