CTravels replaces Sticky = true. Put "Travels" component on anything that should be moved down during travel sequences.

This commit is contained in:
PlatinumSkink
2015-10-15 11:11:06 +02:00
parent 44f2cf72ac
commit 4abce7b17f
12 changed files with 201 additions and 185 deletions
-3
View File
@@ -41,9 +41,6 @@ struct Transform : public Component
glm::vec3 Velocity;
/** Physical scale multiplier. */
glm::vec3 Scale;
// Sticky is if it sticks with the player or not. True means it will follow the camera.
bool Sticky = true;
};
}
+2
View File
@@ -49,6 +49,7 @@
#include "Game/CBrick.h"
#include "Game/CWall.h"
#include "Game/CBackground.h"
#include "Game/CTravels.h"
#include "Game/CStickyAim.h"
#include "Game/BallSystem.h"
#include "Game/HitLagSystem.h"
@@ -128,6 +129,7 @@ public:
m_World->ComponentFactory.Register<Components::Lifebuoy>();
m_World->ComponentFactory.Register<Components::Projectile>();
m_World->ComponentFactory.Register<Components::StickyAim>();
m_World->ComponentFactory.Register<Components::Travels>();
m_World->ComponentFactory.Register<Components::PowerUp>();
m_World->ComponentFactory.Register<Components::PowerUpBrick>();
+1 -1
View File
@@ -93,7 +93,7 @@ public:
private:
float m_XMovementMultiplier = 2.f;
float m_EdgeX = 3.2f;
float m_EdgeX = 3.4f; //Actually 3.2, but anyways.
float m_EdgeY = 5.2f;
int m_MultiBalls = 0;
int m_Lives = 3;
+26
View File
@@ -0,0 +1,26 @@
//
// Created by Adniklastrator on 2015-10-15.
//
#ifndef DAYDREAM_CTRAVELS_H
#define DAYDREAM_CTRAVELS_H
#include "Core/Component.h"
namespace dd
{
namespace Components
{
struct Travels : Component
{
//This indicates that the object moves upon moving to the next stage. Place this on an object that is to move.
//The camera does not move. Things that are to follow the camera should not have this component.
};
}
}
#endif //DAYDREAM_CTRAVELS_H
+1
View File
@@ -25,6 +25,7 @@
#include "Game/CBackground.h"
#include "Game/CProjectile.h"
#include "Game/CPowerUp.h"
#include "Game/CTravels.h"
#include "Game/BrickComponents.h"
+1
View File
@@ -13,6 +13,7 @@
#include "Game/EPause.h"
#include "Game/EArrivedAtNewStage.h"
#include "Game/EStageCleared.h"
#include "Game/CTravels.h"
namespace dd