Damage and Spashdamage working, phantomShapes not really working
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#ifndef Components_FrameTimer_h__
|
||||
#define Components_FrameTimer_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct FrameTimer : public Component
|
||||
{
|
||||
int Frames;
|
||||
virtual FrameTimer* Clone() const override { return new FrameTimer(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // Components_FrameTimer_h__
|
||||
@@ -12,6 +12,8 @@
|
||||
: Damage(1.0f){ }
|
||||
|
||||
float Damage;
|
||||
float ExplosionRadius;
|
||||
float ExplosionStrength;
|
||||
|
||||
virtual TankShell* Clone() const override { return new TankShell(*this); }
|
||||
};
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef Components_Timer_h__
|
||||
#define Components_Timer_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Timer : public Component
|
||||
{
|
||||
double Time;
|
||||
virtual Timer* Clone() const override { return new Timer(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // Components_Timer_h__
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef Trigger_h__
|
||||
#define Trigger_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Trigger : Component
|
||||
{
|
||||
bool TriggerOnce;
|
||||
virtual Trigger* Clone() const override { return new Trigger(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // Trigger_h__
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef TriggerExplosion_h__
|
||||
#define TriggerExplosion_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct TriggerExplosion : Component
|
||||
{
|
||||
TriggerExplosion()
|
||||
: MaxVelocity(1.f), Radius(1.f){ }
|
||||
|
||||
// Velocity = (1 - (distance / radius)^2) * Strength;
|
||||
float MaxVelocity;
|
||||
float Radius; //HACK: Radius should only be in the SphereShapeComponent
|
||||
virtual TriggerExplosion* Clone() const override { return new TriggerExplosion(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // TriggerExplosion_h__
|
||||
Reference in New Issue
Block a user