Added base engine Lua.

Splits callbacks to engine.state menu / game.