going/modules/going/game_over_effect.h
2025-06-17 02:52:26 +02:00

28 lines
660 B
C++

#ifndef GAME_OVER_EFFECT_H
#define GAME_OVER_EFFECT_H
#include "scene/3d/camera_3d.h"
#include "scene/3d/node_3d.h"
#include "scene/animation/animation_player.h"
class PlayerBody;
class GameOverEffect : public Node3D {
GDCLASS(GameOverEffect, Node3D);
static void _bind_methods();
void _notification(int what);
void ready();
void process(double delta);
void physics_process(double delta);
private:
Vector3 last_frame_point{};
float game_over_max_delta{1.0};
float game_over_speed{1.0/2.0};
double game_over_percentage{0.f};
AnimationPlayer *anim{nullptr};
PlayerBody *body{nullptr};
Camera3D *camera{nullptr};
};
#endif // !GAME_OVER_EFFECT_H