minor refactor
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#ifndef LOGIC_SCRIPTING_ENVIRONMENT_H_
|
||||
#define LOGIC_SCRIPTING_ENVIRONMENT_H_
|
||||
|
||||
namespace scripting {
|
||||
/// @brief Lua environment wrapper for automatic deletion
|
||||
class Environment {
|
||||
int env;
|
||||
public:
|
||||
Environment(int env);
|
||||
~Environment();
|
||||
|
||||
int getId() const;
|
||||
|
||||
// @brief Release namespace control
|
||||
void release();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // LOGIC_SCRIPTING_ENVIRONMENT_H_
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "../../logic/LevelController.h"
|
||||
#include "../../frontend/UiDocument.h"
|
||||
#include "../../engine.h"
|
||||
#include "Environment.h"
|
||||
#include "lua/LuaState.h"
|
||||
#include "../../util/stringutil.h"
|
||||
#include "../../util/timeutil.h"
|
||||
|
||||
@@ -33,18 +33,7 @@ namespace scripting {
|
||||
extern BlocksController* blocks;
|
||||
extern LevelController* controller;
|
||||
|
||||
/// @brief Lua environment wrapper for automatic deletion
|
||||
class Environment {
|
||||
int env;
|
||||
public:
|
||||
Environment(int env);
|
||||
~Environment();
|
||||
|
||||
int getId() const;
|
||||
|
||||
// @brief Release namespace control
|
||||
void release();
|
||||
};
|
||||
class Environment;
|
||||
|
||||
void initialize(Engine* engine);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user