[DEV] game engine start to work
This commit is contained in:
parent
2c3084c794
commit
926bbe6b3d
@ -42,6 +42,7 @@ ege::ElementGame::ElementGame(ege::Environement& _env) :
|
|||||||
m_lifeMax(100),
|
m_lifeMax(100),
|
||||||
m_group(0),
|
m_group(0),
|
||||||
m_fixe(true),
|
m_fixe(true),
|
||||||
|
m_radius(0),
|
||||||
m_elementInPhysicsSystem(false)
|
m_elementInPhysicsSystem(false)
|
||||||
{
|
{
|
||||||
static uint32_t unique=0;
|
static uint32_t unique=0;
|
||||||
|
@ -188,6 +188,17 @@ namespace ege
|
|||||||
* @return true : The element is fixed.
|
* @return true : The element is fixed.
|
||||||
*/
|
*/
|
||||||
inline bool IsFixed(void) { return m_fixe; };
|
inline bool IsFixed(void) { return m_fixe; };
|
||||||
|
protected:
|
||||||
|
float m_radius; //!< Radius of the element (all element have a radius, if ==0 ==> then ghost ...
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* @brief Get the current space needed by the element in the workspace
|
||||||
|
* @return The dimention needed.
|
||||||
|
*/
|
||||||
|
inline float GetRadius(void)
|
||||||
|
{
|
||||||
|
return m_radius;
|
||||||
|
};
|
||||||
protected:
|
protected:
|
||||||
bool m_elementInPhysicsSystem;
|
bool m_elementInPhysicsSystem;
|
||||||
public:
|
public:
|
||||||
|
@ -78,46 +78,8 @@ ege::Scene::Scene(void) :
|
|||||||
m_dynamicsWorld->setGravity(btVector3(0,0,0));
|
m_dynamicsWorld->setGravity(btVector3(0,0,0));
|
||||||
m_env.SetDynamicWorld(m_dynamicsWorld);
|
m_env.SetDynamicWorld(m_dynamicsWorld);
|
||||||
|
|
||||||
// Add debug display :
|
|
||||||
ege::ElementGame* tmpElement = NULL;
|
|
||||||
|
|
||||||
// SET THE STATION ..
|
// SET THE STATION ..
|
||||||
m_camera.SetEye(vec3(0,0,0));
|
m_camera.SetEye(vec3(0,0,0));
|
||||||
/*
|
|
||||||
tmpElement = appl::env::GetCreatorList().CreateElement("Station", "(0,0,0)");
|
|
||||||
if (NULL != tmpElement) {
|
|
||||||
appl::env::AddElementGame(tmpElement);
|
|
||||||
tmpElement = NULL;
|
|
||||||
}
|
|
||||||
// for the debug :
|
|
||||||
for (int32_t iii=0; iii<appl::env::GetGird().GetNumberElementInMap(); iii++) {
|
|
||||||
int32_t typeID = appl::env::GetGird().GetElementType(iii);
|
|
||||||
char tmppp[256];
|
|
||||||
vec3 posss = appl::env::GetGird().GetElementPos(iii);
|
|
||||||
sprintf(tmppp, "(%f,%f,%f)", posss.x(), posss.y(), posss.z());
|
|
||||||
if (GIRD_ID_GENERATOR==typeID) {
|
|
||||||
tmpElement = appl::env::GetCreatorList().CreateElement("MonsterGenerator", tmppp);
|
|
||||||
if (NULL != tmpElement) {
|
|
||||||
m_env.AddElementGame(tmpElement);
|
|
||||||
tmpElement = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (GIRD_ID_TOWER==typeID) {
|
|
||||||
tmpElement = appl::env::GetCreatorList().CreateElement("Tower1", tmppp);
|
|
||||||
if (NULL != tmpElement) {
|
|
||||||
m_env.AddElementGame(tmpElement);
|
|
||||||
tmpElement = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (GIRD_ID_METEOR==typeID) {
|
|
||||||
tmpElement = appl::env::GetCreatorList().CreateElement("Meteor", tmppp);
|
|
||||||
if (NULL != tmpElement) {
|
|
||||||
m_env.AddElementGame(tmpElement);
|
|
||||||
tmpElement = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ namespace ege {
|
|||||||
ewol::Colored3DObject* m_debugDrawing; //!< for the debug draw elements
|
ewol::Colored3DObject* m_debugDrawing; //!< for the debug draw elements
|
||||||
// Note : This is only for temporary elements : on the display
|
// Note : This is only for temporary elements : on the display
|
||||||
etk::Vector<ege::Environement::ResultNearestElement> m_displayElementOrdered;
|
etk::Vector<ege::Environement::ResultNearestElement> m_displayElementOrdered;
|
||||||
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Set the scene in pause for a while
|
* @brief Set the scene in pause for a while
|
||||||
*/
|
*/
|
||||||
@ -124,7 +125,7 @@ namespace ege {
|
|||||||
protected: // Derived function
|
protected: // Derived function
|
||||||
virtual void OnDraw(void);
|
virtual void OnDraw(void);
|
||||||
public: // Derived function
|
public: // Derived function
|
||||||
virtual const char * const GetObjectType(void) { return "appl::Game"; };
|
virtual const char * const GetObjectType(void) { return "ege::Scene"; };
|
||||||
virtual void SystemDraw(const ewol::DrawProperty& _displayProp);
|
virtual void SystemDraw(const ewol::DrawProperty& _displayProp);
|
||||||
virtual void OnRegenerateDisplay(void);
|
virtual void OnRegenerateDisplay(void);
|
||||||
virtual void PeriodicCall(const ewol::EventTime& _event);
|
virtual void PeriodicCall(const ewol::EventTime& _event);
|
||||||
|
@ -8,4 +8,7 @@
|
|||||||
|
|
||||||
#include <ege/debug.h>
|
#include <ege/debug.h>
|
||||||
|
|
||||||
const char * egamiLibName = "ege ";
|
const char * egeLibName = "ege ";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ def Create(target):
|
|||||||
|
|
||||||
# add the file to compile:
|
# add the file to compile:
|
||||||
myModule.AddSrcFile([
|
myModule.AddSrcFile([
|
||||||
|
'ege/debug.cpp',
|
||||||
'ege/AudioElement.cpp',
|
'ege/AudioElement.cpp',
|
||||||
'ege/AudioEngine.cpp',
|
'ege/AudioEngine.cpp',
|
||||||
'ege/Camera.cpp',
|
'ege/Camera.cpp',
|
||||||
@ -20,7 +21,7 @@ def Create(target):
|
|||||||
])
|
])
|
||||||
|
|
||||||
# name of the dependency
|
# name of the dependency
|
||||||
myModule.AddModuleDepend(['etk', 'ewol', 'bullet'])
|
myModule.AddModuleDepend(['ewol', 'bullet'])
|
||||||
|
|
||||||
myModule.CompileFlags_CC([
|
myModule.CompileFlags_CC([
|
||||||
'-Wno-write-strings',
|
'-Wno-write-strings',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user