Method: Zyps::Creature#initialize
- Defined in:
- lib/zyps.rb
#initialize(options = {}) ⇒ Creature
Identical to the GameObject constructor, except that it also takes a list of Behavior objects. Takes a hash with these keys and defaults: :name => nil :location => Location.new :color => Color.new :vector => Vector.new :age => 0 :size => 1 :tags => [] :behaviors => []
217 218 219 220 221 222 223 |
# File 'lib/zyps.rb', line 217 def initialize ( = {}) = { :behaviors => [] }.merge() super self.behaviors = [:behaviors] end |