Module: DXRuby::Tiled::LoopTileLayer

Defined in:
lib/dxruby_tiled/tilelayer.rb

Instance Method Summary collapse

Instance Method Details

#[](x, y) ⇒ Object



99
100
101
# File 'lib/dxruby_tiled/tilelayer.rb', line 99

def [](x, y)
  @data[((y - @y1) % @height) * @width + ((x - @x1) % @width)]
end

#[]=(x, y, value) ⇒ Object



103
104
105
# File 'lib/dxruby_tiled/tilelayer.rb', line 103

def []=(x, y, value)
  @data[((y - @y1) % @height) * @width + ((x - @x1) % @width)] = value
end

#include?(x, y) ⇒ Boolean

Returns:

  • (Boolean)


107
108
109
# File 'lib/dxruby_tiled/tilelayer.rb', line 107

def include?(x, y)
  true
end

#member?(x, y) ⇒ Boolean

Returns:

  • (Boolean)


111
112
113
# File 'lib/dxruby_tiled/tilelayer.rb', line 111

def member?(x, y)
  true
end