-
Marie AUDOUARD authoredMarie AUDOUARD authored
dragon.hpp 690 B
#pragma once
#include "cgp/cgp.hpp"
#include "key_positions_structure.hpp"
#include "hitbox.hpp"
using namespace cgp;
// The entire hierarchy
struct dragon{
double size;
int hp;
int max_hp;
float death_time;
bool isdead;
bool isfiring;
float time_fire;
vec3 pos;
vec3 pos_futur;
rotation_transform rot;
hitbox dragon_hitbox;
double delta_sim_time;
double prev_sim_time = 0;
// Timer used for the interpolation of the position
cgp::timer_interval timer_mvt;
// A helper structure used to store and display the key positions/time
keyframe_structure keyframe;
void initialize_mvt(vec3 p, numarray<vec3> key_positions, numarray<float> key_times);
void update_mvt();
};