add debug
This commit is contained in:
parent
2dfcc72343
commit
73a7be3f43
@ -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>();
|
entity.speed = entities[type][name]["speed"].get<float>();
|
||||||
|
|
||||||
|
std::clog << entity.speed;
|
||||||
|
|
||||||
|
entity.position().x +=100;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
#include <SDL3_image/SDL_image.h>
|
#include <SDL3_image/SDL_image.h>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
|
|
||||||
@ -111,6 +112,7 @@ int main() {
|
|||||||
float step = destroyer.speed * deltaTime;
|
float step = destroyer.speed * deltaTime;
|
||||||
destroyer.position().x += (float)moveX * step;
|
destroyer.position().x += (float)moveX * step;
|
||||||
destroyer.position().y += (float)moveY * step;
|
destroyer.position().y += (float)moveY * step;
|
||||||
|
std::clog << "step: " << step << "\n";
|
||||||
|
|
||||||
if (destroyer.gotoT) {
|
if (destroyer.gotoT) {
|
||||||
float dx = destroyer.Tposition.x - destroyer.Central_position().x;
|
float dx = destroyer.Tposition.x - destroyer.Central_position().x;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user