Added trails to other ships toos

This commit is contained in:
Vladislav Khorev committed 2026-03-08 21:27:45 +03:00
1 parent 59b5bea540
commit 24aa7007bb
7 files changed
+128 -88

No files matched your search

+23 -17
View File
@@ -41,6 +41,10 @@ namespace ZL
const char* CONST_ZIP_FILE = "";
#endif
float x = 0;
float y = 0;
float z = 0;
#ifdef EMSCRIPTEN
Game* Game::s_instance = nullptr;
@@ -420,22 +424,6 @@ namespace ZL
handleMotion(ZL::UiManager::MOUSE_FINGER_ID, mx, my);
}
/*if (event.type == SDL_MOUSEBUTTONDOWN) {
int mx = event.button.x;
int my = event.button.y;
handleDown(mx, my);
}
if (event.type == SDL_MOUSEBUTTONUP) {
int mx = event.button.x;
int my = event.button.y;
handleUp(mx, my);
}
if (event.type == SDL_MOUSEMOTION) {
int mx = event.motion.x;
int my = event.motion.y;
handleMotion(mx, my);
}*/
if (event.type == SDL_MOUSEWHEEL) {
static const float zoomstep = 2.0f;
if (event.wheel.y > 0) {
@@ -465,7 +453,25 @@ namespace ZL
if (event.type == SDL_KEYUP) {
if (event.key.keysym.sym == SDLK_a) {
//Environment::shipState.position = { 9466.15820, 1046.00159, 18531.2090 };
x = x + 0.2f;
}
if (event.key.keysym.sym == SDLK_q) {
x = x - 0.2f;
}
if (event.key.keysym.sym == SDLK_s) {
y = y + 0.2f;
}
if (event.key.keysym.sym == SDLK_w) {
y = y - 0.2f;
}
if (event.key.keysym.sym == SDLK_d) {
z = z + 0.2f;
}
if (event.key.keysym.sym == SDLK_e) {
z = z - 0.2f;
}
if (event.key.keysym.sym == SDLK_r) {
std::cout << "Camera position: x=" << x << " y=" << y << " z=" << z << std::endl;
}
}
#endif