18 Ball(
int number, Vector2 initial_position)
20 Sprite(
"resources/images/white_ball.png", initial_position)
30 std::cout <<
"Called Ball()" << std::endl;
35 body->restitution = 1.0f;
36 body->dynamicFriction = 0.5f;
37 body->staticFriction = 0.5f;
60 Stick(Vector2 position) :
Sprite(
"resources/images/stick.png", position)
82 PhysicsBody top_wall[2];
83 PhysicsBody bottom_wall[2];
84 PhysicsBody left_wall[2];
85 PhysicsBody right_wall[2];
void SetPosition(Vector2 pos)
Definition: table.cpp:13
void Update() override
Definition: table.cpp:18
void Draw() override
Draws the sprites.
Definition: table.cpp:23
void AddForce(Vector2 force)
Definition: table.cpp:81
Ball(int number, Vector2 initial_position)
Definition: table.hpp:18
Vector2 GetVelocity()
Definition: table.cpp:8
Vector2 GetPosition()
Definition: table.cpp:3
Vector2 sprite_position
Definition: sprite.hpp:10
float GetWidth()
Gets the width of the sprites.
Definition: sprite.cpp:24
float sprite_scale_factor
Definition: sprite.hpp:12
float GetHeight()
Gets the height of the sprites.
Definition: sprite.cpp:29
Texture2D sprite_texture
Definition: sprite.hpp:11
Stick(Vector2 position)
Definition: table.hpp:60
void SetForce(float value)
Definition: table.cpp:201
void Create() override
Definition: table.cpp:141
Vector2 GetCurrentForce()
Definition: table.cpp:211
bool GetShown()
Definition: table.cpp:206
void Update() override
Definition: table.cpp:148
void SetShown(bool value)
Definition: table.cpp:196
void Draw() override
Draws the sprites.
Definition: table.cpp:178
Table()
Definition: table.hpp:90
void Create() override
Definition: table.cpp:86
#define WINDOW_WIDTH
Definition: config.h:1
#define WINDOW_HEIGHT
Definition: config.h:2