Demos update

-fixed critical bug with demos switching
-change multithreaded rendering method (now draw order is keeped even witch multithreading there is no popping)
-added particle emitter components and systems (WIP)
-bullets (laser) now sending EBullet event insead of EDamage which gives possibility to not destroy bullet if shooted entity is already killed
This commit is contained in:
Mergul 2020-05-23 10:55:31 +02:00
parent 233f4abd47
commit 3d98b0ee5e
4 changed files with 284 additions and 87 deletions

View file

@ -103,7 +103,7 @@ struct Launcher
manager.update("clean");
manager.end();
foreach(system; manager.systems)
foreach(ref system; manager.systems)
{
if(system.id != CountSystem.system_id && system.id != CleanSystem.system_id)system.disable();
}
@ -744,7 +744,9 @@ int main(int argc, char** argv)
{
import demos.simple;
launcher.switchDemo(&simpleStart,&simpleLoop,&simpleEnd,&simpleEvent,&simpleTool,Simple.tips);
import demos.space_invaders;
launcher.switchDemo(&spaceInvadersStart,&spaceInvadersLoop,&spaceInvadersEnd,&spaceInvadersEvent,&spaceInvadersTool,SpaceInvaders.tips);
// launcher.switchDemo(&simpleStart,&simpleLoop,&simpleEnd,&simpleEvent,&simpleTool,Simple.tips);
}
int key_num;