Class: Graphics::Ground

Inherits:
Sprite
  • Object
show all
Defined in:
lib/games_and_rpg_paradise/games/flappy_bird/ruby2d/graphics/ground.rb

Constant Summary collapse

FILE_IMAGE_GAME_SPRITE =
#

FILE_IMAGE_GAME_SPRITE

#
GamesParadise::FlappyBird::FILE_IMAGE_GAME_SPRITE

Instance Method Summary collapse

Constructor Details

#initialize(x:) ⇒ Ground

#

initialize

#


21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/games_and_rpg_paradise/games/flappy_bird/ruby2d/graphics/ground.rb', line 21

def initialize(x:)
  super(
    FILE_IMAGE_GAME_SPRITE,
    width: 288,
    height: 110,
    x: x,
    y: 430,
    z: 3,
    clip_width: 288,
    clip_height: 110,
    clip_x: 584,
  )
end

Instance Method Details

#update!(logic) ⇒ Object

#

update!

#


38
39
40
41
# File 'lib/games_and_rpg_paradise/games/flappy_bird/ruby2d/graphics/ground.rb', line 38

def update!(logic)
  self.x = logic.x
  self.y = logic.y
end