feat: trail fades out
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef SIMS_HPP
|
||||
#define SIMS_HPP
|
||||
|
||||
#include <SDL3/SDL_pixels.h>
|
||||
#include <SDL3/SDL_render.h>
|
||||
#include <utility>
|
||||
|
||||
@@ -10,10 +11,11 @@ private:
|
||||
float y;
|
||||
float vx = 1;
|
||||
float vy = 1;
|
||||
std::pair<float, float> old_positions[100];
|
||||
std::pair<float, float> old_positions[200];
|
||||
|
||||
public:
|
||||
SDL_Renderer* renderer;
|
||||
SDL_Color color = {255, 255, 255, 255}; // white
|
||||
|
||||
Body(int x_pos, int y_pos);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user