Physics stuff
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#ifndef HYDRALIGHTSPAWNERACTOR
|
||||
#define HYDRALIGHTSPAWNERACTOR
|
||||
|
||||
#include "../HydraActor.h"
|
||||
#include <chrono>
|
||||
#include <queue>
|
||||
#include <GLMIncludes.h>
|
||||
class CLASS_DEFINE HydraLightSpawnerActor : public HydraActor
|
||||
{
|
||||
public:
|
||||
void InitialiseComponents() override;
|
||||
void SetEnabled(bool enabled);
|
||||
void FixedTick(float delta_t);
|
||||
void SpawnSettings(float spawns_per_second,
|
||||
glm::vec3 spawn_direction,
|
||||
glm::vec3 dir_variation,
|
||||
float spawn_velocity,
|
||||
float velocity_variation,
|
||||
float spawn_duration);
|
||||
|
||||
private:
|
||||
void _CreatePosition();
|
||||
void _CreateTick();
|
||||
float m_spawns_per_second =0;
|
||||
glm::vec3 m_spawn_direction = {0.0f, 1.0f, 0.0f};
|
||||
glm::vec3 m_dir_variation = {0.0f, 0.0f, 0.0f};
|
||||
float m_spawn_velocity = 0.0f;
|
||||
float m_velocity_variation = 0.0f;
|
||||
float m_spawn_duration;
|
||||
float m_interval = 0.0f;
|
||||
bool m_enabled = false;
|
||||
std::chrono::time_point<std::chrono::steady_clock> m_last_tick;
|
||||
std::queue<HydraID> m_spawned_actors;
|
||||
};
|
||||
|
||||
|
||||
#endif /* HYDRALIGHTSPAWNERACTOR */
|
||||
Reference in New Issue
Block a user