add debug

This commit is contained in:
PoliEcho 2025-02-18 15:51:00 +01:00
parent 2dfcc72343
commit 73a7be3f43
2 changed files with 6 additions and 0 deletions

View File

@ -46,5 +46,9 @@ void init_entity(Entity &entity, SDL_Renderer *renderer,std::string type, std::s
entity.speed = entities[type][name]["speed"].get<float>();
std::clog << entity.speed;
entity.position().x +=100;
}

View File

@ -4,6 +4,7 @@
#include <SDL3/SDL.h>
#include <SDL3_image/SDL_image.h>
#include <cmath>
#include <iostream>
#include <vector>
#include <csignal>
@ -111,6 +112,7 @@ int main() {
float step = destroyer.speed * deltaTime;
destroyer.position().x += (float)moveX * step;
destroyer.position().y += (float)moveY * step;
std::clog << "step: " << step << "\n";
if (destroyer.gotoT) {
float dx = destroyer.Tposition.x - destroyer.Central_position().x;