kiigame / adventure_engine

KiiGame Adventure Engine
BSD 3-Clause "New" or "Revised" License
1 stars 6 forks source link

Move global variables to inside the engine class #136

Closed jnnl closed 5 years ago

jnnl commented 5 years ago

This PR converts the global variables defined in kiigame.js to instance variables of the engine class. It ensures that the variables are unique to each engine object and consistent with the engine state whenever the engine is instantiated.

Tested by verifying that Lätkäzombit can be played through without any errors and that custom rudimentary games can be created/played using the kged editor. Also checked that multiple instances of the engine class can be created without issues.