Primer commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "sprite.h"
|
||||
#include "texture.h"
|
||||
#include "defines.h"
|
||||
|
||||
class Ball
|
||||
{
|
||||
private:
|
||||
Sprite *sprite; // Sprite para pintar la clase
|
||||
int x; // Posición x
|
||||
int y; // Posición y
|
||||
int w; // Ancho
|
||||
int h; // Alto
|
||||
int vx, vy; // Velocidad
|
||||
color_t color; // Color de la pelota
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Ball(int x, int y, int w, int h, int vx, int vy, Texture *texture);
|
||||
|
||||
// Destructor
|
||||
~Ball();
|
||||
|
||||
// Actualiza la lógica de la clase
|
||||
void update();
|
||||
|
||||
// Pinta la clase
|
||||
void render();
|
||||
|
||||
// Establece el valor de la velocidad
|
||||
void setVx(int value);
|
||||
|
||||
// Establece el valor de la velocidad
|
||||
void setVy(int value);
|
||||
};
|
||||
Reference in New Issue
Block a user