Method: Zyps::GameObject#initialize
- Defined in:
- lib/zyps.rb
#initialize(options = {}) ⇒ GameObject
Takes a hash with these keys and defaults: :name => nil, :location => Location.new, :color => Color.new, :vector => Vector.new, :age => 0, :size => 1, :tags => []
145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/zyps.rb', line 145 def initialize ( = {}) = { :name => nil, :location => Location.new, :color => Color.new, :vector => Vector.new, :age => 0, :size => 1, :tags => [] }.merge() self.name, self.location, self.color, self.vector, self.age, self.size, self. = [:name], [:location], [:color], [:vector], [:age], [:size], [:tags] @identifier = generate_identifier end |