Jump to content

Recommended Posts

Posted

Which way is better to work with event handlers? Performance wise?

 

One Event Handler with many iterations of

 

if Event.id == this_event then

  do this

elseif Event.id == that_event then

  do that

end

 

or e.g. one event handler / event?

 

Landing_Event_Handler = {}
world.addEventHandler(Landing_Event_Handler)

Takeoff_Event_Handler = {}
world.addEventHandler(Takeoff_Event_Handler)

 

and then not having to have so many "if" iterations...?

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...