Class: EhbGameLib::Nes::Color
- Inherits:
-
Object
- Object
- EhbGameLib::Nes::Color
- Defined in:
- lib/ehb_game_lib/nes/color.rb
Constant Summary collapse
- BLACK =
0x0F
- YELLOW =
0x28
- RED =
0x05
- WHITE =
0x30
Instance Attribute Summary collapse
-
#color_index ⇒ Object
Returns the value of attribute color_index.
Instance Method Summary collapse
- #gosu_color ⇒ Object
-
#initialize(all_colors, color_index) ⇒ Color
constructor
A new instance of Color.
Constructor Details
#initialize(all_colors, color_index) ⇒ Color
Returns a new instance of Color.
13 14 15 16 |
# File 'lib/ehb_game_lib/nes/color.rb', line 13 def initialize(all_colors, color_index) @all_colors = all_colors @color_index = color_index end |
Instance Attribute Details
#color_index ⇒ Object
Returns the value of attribute color_index.
6 7 8 |
# File 'lib/ehb_game_lib/nes/color.rb', line 6 def color_index @color_index end |
Instance Method Details
#gosu_color ⇒ Object
18 19 20 |
# File 'lib/ehb_game_lib/nes/color.rb', line 18 def gosu_color @all_colors.gosu_color(color_index) end |