Many more things done
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include <array>
|
||||
|
||||
#include "Core/Util/Logging.h"
|
||||
#include "Core/Util/IfDebug.h"
|
||||
@@ -32,11 +32,6 @@ private:
|
||||
ShaderProgram* m_BasicForwardProgram;
|
||||
|
||||
ShaderProgram* m_CoolDeathAnimProgram;
|
||||
|
||||
glm::vec3 Origin;
|
||||
GLfloat TimeDeath = 0.f;
|
||||
GLfloat EndDeath = 0.f;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -67,13 +67,18 @@ struct ModelJob : RenderJob
|
||||
struct CoolDeathAnimationJob : ModelJob
|
||||
{
|
||||
glm::vec3 OriginPos;
|
||||
float TimeSinceDeath = 0.f;
|
||||
float EndOfDeath = 15.0f;
|
||||
|
||||
double TimeSinceDeath = 0.f;
|
||||
double EndOfDeath = 2.f;
|
||||
bool Gravity = true;
|
||||
double GravityForce = 1.f; // Speed
|
||||
double ObjectRadius = 2.f; // TODO: Change this for object radius when it's available
|
||||
glm::vec4 EndColor;
|
||||
bool UseRandomness = false;
|
||||
std::array<float, 10> RandomNumbers;
|
||||
float RandomnessScalar = 1.f;
|
||||
float Acceleration = 0.f;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SpriteJob : RenderJob
|
||||
{
|
||||
unsigned int ShaderID = 0;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "Common.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
class CoolDeathAnimationSystem : public PureSystem
|
||||
{
|
||||
public:
|
||||
CoolDeathAnimationSystem(EventBroker* eventBroker)
|
||||
: PureSystem(eventBroker, "CoolDeathAnim")
|
||||
{ }
|
||||
|
||||
virtual void UpdateComponent(World* world, ComponentWrapper& object, double dt) override
|
||||
{
|
||||
ComponentWrapper& Component = world->GetComponent(object.EntityID, "CoolDeathAnim");
|
||||
|
||||
if ((double)Component["TimeSinceDeath"] > (double)Component["EndOfDeath"]) {
|
||||
(double)Component["TimeSinceDeath"] = 0.f;
|
||||
}
|
||||
(double&)Component["TimeSinceDeath"] += dt;
|
||||
}
|
||||
};
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "Core/EntityXMLFile.h"
|
||||
#include "Core/SystemPipeline.h"
|
||||
#include "RaptorCopterSystem.h"
|
||||
#include "CoolDeathAnimationSystem.h"
|
||||
#include "PlayerSystem.h"
|
||||
#include "Editor/EditorSystem.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user