-update README code example (to one that compile)
-remove Entity.instance and gEM, global manager is now gEntityManager
This commit is contained in:
parent
d1c48e4c5f
commit
3b954b732b
11 changed files with 617 additions and 604 deletions
|
|
@ -192,7 +192,7 @@ struct Launcher
|
|||
{
|
||||
vec2 rel_vec = data.location[i] - position;
|
||||
float length = rel_vec.x * rel_vec.x + rel_vec.y * rel_vec.y;
|
||||
if(length < size2)gEM.removeEntity(data.entity[i].id);
|
||||
if(length < size2)gEntityManager.removeEntity(data.entity[i].id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ struct Launcher
|
|||
{
|
||||
vec2 rel_vec = data.location[i] - position;
|
||||
float length = rel_vec.x * rel_vec.x + rel_vec.y * rel_vec.y;
|
||||
if(length < size2)gEM.addComponents(data.entity[i].id, add_comps);
|
||||
if(length < size2)gEntityManager.addComponents(data.entity[i].id, add_comps);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -216,8 +216,8 @@ struct Launcher
|
|||
float length = rel_vec.x * rel_vec.x + rel_vec.y * rel_vec.y;
|
||||
if(length < size2)
|
||||
{
|
||||
gEM.removeComponents(data.entity[i].id, rem_comps);
|
||||
gEM.addComponents(data.entity[i].id, add_comps);
|
||||
gEntityManager.removeComponents(data.entity[i].id, rem_comps);
|
||||
gEntityManager.addComponents(data.entity[i].id, add_comps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -229,7 +229,7 @@ struct Launcher
|
|||
{
|
||||
vec2 rel_vec = data.location[i] - position;
|
||||
float length = rel_vec.x * rel_vec.x + rel_vec.y * rel_vec.y;
|
||||
if(length < size2)gEM.removeComponents(data.entity[i].id, rem_comps);
|
||||
if(length < size2)gEntityManager.removeComponents(data.entity[i].id, rem_comps);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1231,7 +1231,7 @@ int app_main(int argc, char** argv)
|
|||
//launcher.job_updater.onCreate();
|
||||
|
||||
EntityManager.initialize(32, 1<<16);
|
||||
launcher.manager = EntityManager.instance;
|
||||
launcher.manager = gEntityManager;
|
||||
|
||||
//launcher.manager.m_thread_id_func = &launcher.job_updater.getThreadID;
|
||||
//launcher.manager.setJobDispachFunc(&launcher.job_updater.dispatch);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue