src/game_objects/game_object_loader.rb
# loads game objects and stores them in cache
# [object_id] the object id to load
# [object_hash] the hash describing the object
loads game objects and stores them in cache
[object_id] the object id to load
[object_hash] the hash describing the object
loads game objects and stores them in cache [ object_id ] the object id to load [ object_hash ] the hash describing the object
def load_object(object_id)
    return nil if object_id.nil?
    new_o = load_object_by_id(object_id)
    unless new_o.nil?
      log.debug { "caching object #{new_o} as #{object_id}" }
      @cache[object_id] = new_o
    end
    new_o.on_load if new_o.is_a? BasicGameObject
    new_o
  end
def load_object ( object_id ) return nil if object_id . nil? new_o = load_object_by_id ( object_id ) unless new_o . nil? log . debug { "caching object #{new_o} as #{object_id}" } @cache [ object_id ] = new_o end new_o . on_load if new_o . is_a? BasicGameObject new_o end
loads game objects and stores them in cache
[object_id] the object id to load
[object_hash] the hash describing the object
loads game objects and stores them in cache [ object_id ] the object id to load [ object_hash ] the hash describing the object
# call object's load method
object_id
<not_specific>