CTravels replaces Sticky = true. Put "Travels" component on anything that should be moved down during travel sequences.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "Game/CBackground.h"
|
||||
#include "Game/CProjectile.h"
|
||||
#include "Game/CPowerUp.h"
|
||||
#include "Game/CTravels.h"
|
||||
|
||||
#include "Game/BrickComponents.h"
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "Game/EPause.h"
|
||||
#include "Game/EArrivedAtNewStage.h"
|
||||
#include "Game/EStageCleared.h"
|
||||
#include "Game/CTravels.h"
|
||||
|
||||
|
||||
namespace dd
|
||||
|
||||
Reference in New Issue
Block a user