Class: GamesAndRpgParadise::Brick

Inherits:
Object
  • Object
show all
Defined in:
lib/games_and_rpg_paradise/gui/gosu/battle_city/brick.rb

Overview

GamesAndRpgParadise::Brick

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBrick

#

initialize

#


16
17
18
19
20
21
22
# File 'lib/games_and_rpg_paradise/gui/gosu/battle_city/brick.rb', line 16

def initialize
  # ========================================================================= #
  # All bricks are 40px by 40px.
  # ========================================================================= #
  @brick = ::Gosu::Image.new('media/brick.png')
  reset
end

Instance Attribute Details

#existObject

Returns the value of attribute exist.



11
12
13
# File 'lib/games_and_rpg_paradise/gui/gosu/battle_city/brick.rb', line 11

def exist
  @exist
end

#xObject

Returns the value of attribute x.



9
10
11
# File 'lib/games_and_rpg_paradise/gui/gosu/battle_city/brick.rb', line 9

def x
  @x
end

#yObject

Returns the value of attribute y.



10
11
12
# File 'lib/games_and_rpg_paradise/gui/gosu/battle_city/brick.rb', line 10

def y
  @y
end

Instance Method Details

#brick?Boolean Also known as: brick

#

brick?

#

Returns:

  • (Boolean)


34
35
36
# File 'lib/games_and_rpg_paradise/gui/gosu/battle_city/brick.rb', line 34

def brick?
  @brick
end

#resetObject

#

reset

#


27
28
29
# File 'lib/games_and_rpg_paradise/gui/gosu/battle_city/brick.rb', line 27

def reset
  @exist = true
end