Class: Doom::Wad::HudGraphics
- Inherits:
-
Object
- Object
- Doom::Wad::HudGraphics
- Defined in:
- lib/doom/wad/hud_graphics.rb
Overview
Loads HUD graphics (status bar, weapons) from WAD
Instance Attribute Summary collapse
-
#arms_background ⇒ Object
readonly
Returns the value of attribute arms_background.
-
#faces ⇒ Object
readonly
Returns the value of attribute faces.
-
#grey_numbers ⇒ Object
readonly
Returns the value of attribute grey_numbers.
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
-
#numbers ⇒ Object
readonly
Returns the value of attribute numbers.
-
#status_bar ⇒ Object
readonly
Returns the value of attribute status_bar.
-
#weapons ⇒ Object
readonly
Returns the value of attribute weapons.
-
#yellow_numbers ⇒ Object
readonly
Returns the value of attribute yellow_numbers.
Instance Method Summary collapse
-
#[](name) ⇒ Object
Get a cached graphic by name.
-
#initialize(wad) ⇒ HudGraphics
constructor
A new instance of HudGraphics.
Constructor Details
#initialize(wad) ⇒ HudGraphics
Returns a new instance of HudGraphics.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/doom/wad/hud_graphics.rb', line 9 def initialize(wad) @wad = wad @cache = {} load_numbers load_weapons load_faces load_keys end |
Instance Attribute Details
#arms_background ⇒ Object (readonly)
Returns the value of attribute arms_background.
7 8 9 |
# File 'lib/doom/wad/hud_graphics.rb', line 7 def arms_background @arms_background end |
#faces ⇒ Object (readonly)
Returns the value of attribute faces.
7 8 9 |
# File 'lib/doom/wad/hud_graphics.rb', line 7 def faces @faces end |
#grey_numbers ⇒ Object (readonly)
Returns the value of attribute grey_numbers.
7 8 9 |
# File 'lib/doom/wad/hud_graphics.rb', line 7 def grey_numbers @grey_numbers end |
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
7 8 9 |
# File 'lib/doom/wad/hud_graphics.rb', line 7 def keys @keys end |
#numbers ⇒ Object (readonly)
Returns the value of attribute numbers.
7 8 9 |
# File 'lib/doom/wad/hud_graphics.rb', line 7 def numbers @numbers end |
#status_bar ⇒ Object (readonly)
Returns the value of attribute status_bar.
7 8 9 |
# File 'lib/doom/wad/hud_graphics.rb', line 7 def @status_bar end |
#weapons ⇒ Object (readonly)
Returns the value of attribute weapons.
7 8 9 |
# File 'lib/doom/wad/hud_graphics.rb', line 7 def weapons @weapons end |
#yellow_numbers ⇒ Object (readonly)
Returns the value of attribute yellow_numbers.
7 8 9 |
# File 'lib/doom/wad/hud_graphics.rb', line 7 def yellow_numbers @yellow_numbers end |
Instance Method Details
#[](name) ⇒ Object
Get a cached graphic by name
21 22 23 |
# File 'lib/doom/wad/hud_graphics.rb', line 21 def [](name) @cache[name] end |