Class: SproutPunk::Assets::ClassGenerator

Inherits:
FlashSDK::ClassGenerator
  • Object
show all
Defined in:
lib/sproutpunk/assets.rb

Instance Method Summary collapse

Constructor Details

#initializeClassGenerator

Returns a new instance of ClassGenerator.



15
16
17
18
# File 'lib/sproutpunk/assets.rb', line 15

def initialize
  super
  @assets = []
end

Instance Method Details

#manifestObject



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/sproutpunk/assets.rb', line 20

def manifest
  @assets << Asset.new('../assets/ghoul.png', 'GHOUL_SPRITE')
  @assets << Asset.new('../assets/cone.png', 'CONE_SPRITE')
  @assets << Asset.new('../assets/friendly.png', 'FRIENDLY_SPRITE')
  @assets << Asset.new('../assets/priest.png', 'PRIEST_SPRITE')

  puts 'asset list:'
  @assets.each do |asset|
    puts "#{asset.class_name} -- #{asset.source_file}"
  end

  template "Assets.as", 'FlashpunkAssetsClass.as'
end