Änderung von Capter1 auf SDL3
This commit is contained in:
@@ -23,7 +23,7 @@ ball::ball(int x, int y, int vx, int vy)
|
||||
|
||||
alive = true;
|
||||
|
||||
rect = {x,y,20,20};
|
||||
rect = {(float)x,(float)y,20,20};
|
||||
color = {255,0,0,255};
|
||||
}
|
||||
|
||||
@@ -53,9 +53,9 @@ void ball::Update(float f_DeltaTime, std::vector<ball> &list){
|
||||
this->alive = false;
|
||||
}
|
||||
|
||||
color.r += r_dir;
|
||||
color.g += g_dir;
|
||||
color.b += b_dir;
|
||||
color.r += r_dir * (255.0f / 2.0f) * f_DeltaTime; // Richtung * (MaxWert / ZeitfensterFürAnimation) * Vergangene Zeit seit der Letzten Berechnung
|
||||
color.g += g_dir * (255.0f / 2.0f) * f_DeltaTime;
|
||||
color.b += b_dir * (255.0f / 2.0f) * f_DeltaTime;
|
||||
|
||||
//=================ColorCycle======================
|
||||
// Clamp values between 1 and 254
|
||||
|
||||
Reference in New Issue
Block a user