Module: Igg::Builder::EntityBuilder
- Defined in:
- lib/igg/builder/entity_builder.rb
Instance Method Summary collapse
Instance Method Details
#build_entity ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/igg/builder/entity_builder.rb', line 7 def build_entity if in_app_root? @width, @height = 16, 16 empty_directory "lib/game/entities" template 'builder/templates/entity/entity.tt', "lib/game/entities/#{@name}.js" else puts "you are not in an ImpactJS project root folder" end end |
#in_app_root? ⇒ Boolean
4 5 6 |
# File 'lib/igg/builder/entity_builder.rb', line 4 def in_app_root? File.exist?('lib/game/entities') end |