lib/demiurge/tmx.rb
def tmx_location(name, options = {}, &block)
        state = { "zone" => @name }.merge(options)
        builder = TmxLocationBuilder.new(name, @engine, "type" => options["type"] || "TmxLocation", "state" => state)
        builder.instance_eval(&block)
        @built_item.state["contents"] << name
        nil
      end
# This is currently an ugly monkeypatch to allow declaring a
# "tmx_location" separate from other kinds of declarable
# StateItems. This remains ugly until the plugin system catches up
# with the intrusiveness of what TMX needs to plug in (which isn't
# bad, but the plugin system barely exists.)
This is currently an ugly monkeypatch to allow declaring a
"tmx_location" separate from other kinds of declarable
StateItems. This remains ugly until the plugin system catches up
with the intrusiveness of what TMX needs to plug in (which isn't
bad, but the plugin system barely exists.)
This is currently an ugly monkeypatch to allow declaring a " tmx_location " separate from other kinds of declarable StateItems . This remains ugly until the plugin system catches up with the intrusiveness of what TMX needs to plug in ( which isn ' t bad but the plugin system barely exists . )
def tmx_location(name, options = {}, &block)
        state = { "zone" => @name }.merge(options)
        builder = TmxLocationBuilder.new(name, @engine, "type" => options["type"] || "TmxLocation", "state" => state)
        builder.instance_eval(&block)
        @built_item.state["contents"] << name
        nil
      end
def tmx_location ( name , options = { } , & block ) state = { "zone" => @name } . merge ( options ) builder = TmxLocationBuilder . new ( name , @engine , "type" => options [ "type" ] || "TmxLocation" , "state" => state ) builder . instance_eval ( & block ) @built_item . state [ "contents" ] << name nil end
This is currently an ugly monkeypatch to allow declaring a
"tmx_location" separate from other kinds of declarable
StateItems.
This is currently an ugly monkeypatch to allow declaring a " tmx_location " separate from other kinds of declarable StateItems .
name
options
block