Class: LiteRGSS::SpriteMap

Inherits:
Drawable show all
Defined in:
LiteRGSS.rb.yard.rb

Overview

Class that allow to draw tiles on a row

Direct Known Subclasses

SpriteMap

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Disposable

#dispose, #disposed?

Instance Attribute Details

#__index__Integer (readonly)

Return the SpriteMap “index”

Returns:

  • (Integer)

    Return the SpriteMap “index”



751
752
753
# File 'LiteRGSS.rb.yard.rb', line 751

def __index__
  @__index__
end

#oxNumeric

Returns origin X.

Returns:

  • (Numeric)

    origin X



745
746
747
# File 'LiteRGSS.rb.yard.rb', line 745

def ox
  @ox
end

#oyNumeric

Returns origin Y.

Returns:

  • (Numeric)

    origin Y



747
748
749
# File 'LiteRGSS.rb.yard.rb', line 747

def oy
  @oy
end

#tile_scaleNumeric

Returns scale of each tiles in the SpriteMap.

Returns:

  • (Numeric)

    scale of each tiles in the SpriteMap



749
750
751
# File 'LiteRGSS.rb.yard.rb', line 749

def tile_scale
  @tile_scale
end

#viewportViewport (readonly)

Returns viewport used to draw the row.

Returns:

  • (Viewport)

    viewport used to draw the row



737
738
739
# File 'LiteRGSS.rb.yard.rb', line 737

def viewport
  @viewport
end

#xNumeric

Returns X position.

Returns:

  • (Numeric)

    X position



739
740
741
# File 'LiteRGSS.rb.yard.rb', line 739

def x
  @x
end

#yNumeric

Returns Y position.

Returns:

  • (Numeric)

    Y position



741
742
743
# File 'LiteRGSS.rb.yard.rb', line 741

def y
  @y
end

#zInteger

Returns Z index.

Returns:

  • (Integer)

    Z index



743
744
745
# File 'LiteRGSS.rb.yard.rb', line 743

def z
  @z
end

Class Method Details

.new(viewport, tile_width, tile_count)

Create a new SpriteMap

Parameters:

  • viewport (Viewport)

    viewport used to draw the row

  • tile_width (Integer)

    width of a tile

  • tile_count (Integer)

    number of tile to draw in the row



695
696
697
# File 'LiteRGSS.rb.yard.rb', line 695

def self.new(viewport, tile_width, tile_count)

end

Instance Method Details

#reset

Clear the SpriteMap



713
714
715
# File 'LiteRGSS.rb.yard.rb', line 713

def reset

end

#set(index, bitmap, rect)

Set the tile to draw at a certain position in the row

Parameters:

  • index (Integer)

    Index of the tile in the row

  • bitmap (Bitmap)

    Bitmap to use in order to draw the tile

  • rect (Rect)

    surface of the bitmap to draw in the tile



720
721
722
# File 'LiteRGSS.rb.yard.rb', line 720

def set(index, bitmap, rect)

end

#set_origin(ox, oy) ⇒ self

Set the origin of the textures of the SpriteMap

Parameters:

  • ox (Numeric)
  • oy (Numeric)

Returns:

  • (self)


709
710
711
# File 'LiteRGSS.rb.yard.rb', line 709

def set_origin(ox, oy)

end

#set_position(x, y) ⇒ self

Set the position of the SpriteMap

Parameters:

  • x (Numeric)
  • y (Numeric)

Returns:

  • (self)


702
703
704
# File 'LiteRGSS.rb.yard.rb', line 702

def set_position(x, y)

end

#set_rect(index, x, y, width, height)

Parameters:

  • index (Integer)

    Index of the tile in the row

  • x (Integer)

    x coordinate of the surface in the bitmap

  • y (Integer)

    y coordinate of the surface in the bitmap

  • width (Integer)

    width of the surface in the bitmap

  • height (Integer)

    height of the surface in the bitmap



725
726
727
# File 'LiteRGSS.rb.yard.rb', line 725

def set_rect(index, rect)

end