Class: GamesAndRpgParadise::GUI::Gtk::Walls

Inherits:
Array
  • Object
show all
Defined in:
lib/games_and_rpg_paradise/gui/gtk3/block/walls.rb

Instance Method Summary collapse

Constructor Details

#initialize(use_this_colour_for_the_wall = :WHITE) ⇒ Walls

#

initialize

#


20
21
22
23
24
25
26
27
28
29
30
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/walls.rb', line 20

def initialize(
    use_this_colour_for_the_wall = :WHITE
  )
  # ======================================================================= #
  # Add three walls.
  # ======================================================================= #
  self << Wall.new(  0, 0,  20, 480, use_this_colour_for_the_wall)
  self << Wall.new(  0, 0, 640,  20, use_this_colour_for_the_wall)
  self << Wall.new(620, 0,  20, 480, use_this_colour_for_the_wall)
  reset
end

Instance Method Details

#drawObject

#

draw

#


46
47
48
49
50
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/walls.rb', line 46

def draw
  each { |wall|
    wall.draw
  }
end

#resetObject

#

reset

#


35
36
37
38
39
40
41
# File 'lib/games_and_rpg_paradise/gui/gtk3/block/walls.rb', line 35

def reset
  # reset_the_internal_variables
  # ======================================================================= #
  # === @configuration
  # ======================================================================= #
  @configuration = [true, __dir__, inspect]
end