--- /dev/null
+#include "Effect.h"
+
+Effect::Effect()
+{
+
+}
+
+Effect::~Effect()
+{
+
+}
#ifndef EFFECT_H
#define EFFECT_H
+#include "../Vector2.h"
+#include "../Entities/PhysicsEntity.h"
+
/// ***** Header Class *****
class Effect
{
+ protected:
+ Effect();
+
public:
- virtual Vector2 positionAfter(const Vector&, float) const = 0;
- virtual Vector2 velocityAfter(const Vector&, float) const = 0;
-}
+ virtual ~Effect();
+
+ virtual Vector2 positionDelta(const PhysicsEntity*, float) const = 0;
+ virtual Vector2 velocityDelta(const PhysicsEntity*, float) const = 0;
+ virtual Vector2 forceDelta(const PhysicsEntity*, float) const = 0;
+};
#endif // EFFECT_H
#include "Gravity.h"
-/// ***** Header Class *****
-Vector2 Gravity::positionAfter(const Vector2&, float)
+Gravity::Gravity()
{
}
-Vector2 Gravity::velocityAfter(const Vector2&, float)
+Gravity::~Gravity()
{
}
-#endif // GRAVITY_H
+Vector2 Gravity::positionDelta(const PhysicsEntity*, float)
+{
+ return Vector2(0, 0);
+}
+
+Vector2 Gravity::velocityDelta(const PhysicsEntity*, float)
+{
+ return Vector2(0, 0);
+}
+
+Vector2 Gravity::forceDelta(const PhysicsEntity*, float)
+{
+ return Vector2(0, 0.000001);
+}
#ifndef GRAVITY_H
#define GRAVITY_H
+#include "../Vector2.h"
#include "Effect.h"
/// ***** Header Class *****
class Gravity: public Effect
{
- Vector2 positionAfter(const Vector2&, float);
- Vector2 velocityAfter(const Vector2&, float);
-}
+ public:
+ Gravity();
+ ~Gravity();
+
+ Vector2 positionDelta(const PhysicsEntity*, float);
+ Vector2 velocityDelta(const PhysicsEntity*, float);
+ Vector2 forceDelta(const PhysicsEntity*, float);
+};
#endif // GRAVITY_H
SRCS += GameStates/Paused.cpp
SRCS += GameStates/Running.cpp
+SRCS += Effects/Effect.cpp
+SRCS += Effects/Gravity.cpp
+
SRCS += input/inputManager.cpp
SRCS += graphics/graphics.cpp
HRDS := ${SRCS:.cpp=.h}
HRDS := ${HRDS:main.h=} # remove main.h
HRDS += debug.h
+
HRDS += graphics/colors.h
TARS := ${SRCS} ${HRDS} Makefile