class RaylibPong::Paddle
- RaylibPong::Paddle
- Reference
- Object
Overview
A player controlled paddle.
Defined in:
raylib_pong.crConstant Summary
-
HEIGHT =
0.1
-
The relative height of the paddle
-
MARGIN =
0.1
-
How relative width the paddle should be from the edge of the screen
-
SPEED =
0.75
-
How fast the paddle can move
-
WIDTH =
0.01
-
The relative width of the paddle
Constructors
Instance Method Summary
-
#abs_bounds
The absolute bounding box of the paddle on the screen.
-
#bounds
The relative bounding box of the paddle.
-
#draw
Draws the paddle on the screen.
-
#move(d : Direction)
Move the paddle in a direction.
-
#owner : Player
What player owns this paddle.
-
#position : Raylib::Vector2
The relative location of the paddle.
-
#position=(position : Raylib::Vector2)
The relative location of the paddle.
-
#update
Update the paddle.
-
#wall_hit_check
Checks if the paddle has hit a wall and confines it within the play area.