Demos update (SpaceInvaders demo)

-added new sprites
-added new functions to vectors
-fixed rendering rotated sprites
-small performance improvement and some bug fixes
-added animations support
-bullets get initial velocity from parent
-added partiles for fire from gun and explosion of enemies
This commit is contained in:
Mergul 2020-05-19 20:27:18 +02:00
parent 6c3c803d1e
commit 0b924ae77c
7 changed files with 411 additions and 34 deletions

View file

@ -262,7 +262,7 @@ void mainLoop(void* arg)
if(launcher.tool && launcher.tool_repeat != 0 && launcher.mouse.left && !igIsWindowHovered(ImGuiHoveredFlags_AnyWindow) && !igIsWindowFocused(ImGuiFocusedFlags_AnyWindow))
{
float range = 500.0 / cast(float)launcher.tool_repeat;
launcher.repeat_time += launcher.delta_time;
launcher.repeat_time += launcher.delta_time * 100;
while(launcher.repeat_time > range)
{
launcher.repeat_time -= range;
@ -716,7 +716,7 @@ int main(int argc, char** argv)
launcher.job_updater = Mallocator.make!ECSJobUpdater(1);
//launcher.job_updater.onCreate();
EntityManager.initialize(32);
EntityManager.initialize(32, 1<<16);
launcher.manager = EntityManager.instance;
//launcher.manager.m_thread_id_func = &launcher.job_updater.getThreadID;