Sha256: e2bc6cf79129b76bf2593e7314e859894f959abd4554b9144bf530e7d3a27f10

Contents?: true

Size: 501 Bytes

Versions: 5

Compression:

Stored size: 501 Bytes

Contents

module Ruby2D
  module Renderable
    attr_reader :z

    def z=(z)
      remove
      @z = z
      add
    end

    def add
      if Module.const_defined? :DSL
        Application.add(self)
      end
    end

    def remove
      if Module.const_defined? :DSL
        Application.remove(self)
      end
    end

    def opacity
      self.color.opacity
    end

    def opacity=(val)
      self.color.opacity = val
    end

    def contains?(x, y)
      raise "Not implemented yet"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby2d-0.5.1 lib/ruby2d/renderable.rb
ruby2d-0.5.0 lib/ruby2d/renderable.rb
ruby2d-0.4.2 lib/ruby2d/renderable.rb
ruby2d-0.4.1 lib/ruby2d/renderable.rb
ruby2d-0.4.0 lib/ruby2d/renderable.rb