arreglos d'estil
This commit is contained in:
+5
-5
@@ -1,16 +1,16 @@
|
||||
#include "ball.h"
|
||||
#include <stdlib.h> // for rand
|
||||
#include <cmath> // for fabs
|
||||
#include "defines.h" // for BALL_SIZE, Color, SCREEN_HEIGHT, GRAVITY_FORCE
|
||||
#include <stdlib.h> // for rand
|
||||
#include <cmath> // for fabs
|
||||
#include "defines.h" // for BALL_SIZE, Color, SCREEN_HEIGHT, GRAVITY_FORCE
|
||||
class Texture;
|
||||
|
||||
// Constructor
|
||||
Ball::Ball(float x, float vx, float vy, Color color, std::shared_ptr<Texture> texture)
|
||||
: sprite_(std::make_unique<Sprite>(texture)),
|
||||
pos_({x, 0.0f, BALL_SIZE, BALL_SIZE})
|
||||
{
|
||||
pos_ = {x, 0.0f, BALL_SIZE, BALL_SIZE};
|
||||
vx_ = vx;
|
||||
vy_ = vy;
|
||||
sprite_ = std::make_unique<Sprite>(texture);
|
||||
sprite_->setPos({pos_.x, pos_.y});
|
||||
sprite_->setSize(BALL_SIZE, BALL_SIZE);
|
||||
sprite_->setClip({0, 0, BALL_SIZE, BALL_SIZE});
|
||||
|
||||
Reference in New Issue
Block a user