Class: Pixelart::Metadata::Sprite

Inherits:
Object
  • Object
show all
Defined in:
lib/spritesheet/spritesheet.rb

Overview

todo/check: rename/change type to category - why? why not?

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, name:, type:, more_names: []) ⇒ Sprite

Returns a new instance of Sprite.



8
9
10
11
12
13
14
15
16
# File 'lib/spritesheet/spritesheet.rb', line 8

def initialize( id:,
                name:,
                type:,
                more_names: [] )
   @id         = id      # zero-based index eg. 0,1,2,3, etc.

   @name       = name
   @type       = type
   @more_names = more_names
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/spritesheet/spritesheet.rb', line 6

def id
  @id
end

#more_namesObject (readonly)

Returns the value of attribute more_names.



6
7
8
# File 'lib/spritesheet/spritesheet.rb', line 6

def more_names
  @more_names
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/spritesheet/spritesheet.rb', line 6

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/spritesheet/spritesheet.rb', line 6

def type
  @type
end