<commit_before>package rpg;
import haxe.Json;
import haxe.Timer;
import hscript.Interp;
import hscript.Parser;
import impl.IAssetManager;
import impl.IImplementation;
import rpg.config.Config;
import rpg.event.EventManager;
import rpg.image.ImageManager;
import rpg.input.InputManager;
import rpg.item.ItemManager;
import rpg.map.GameMap;
import rpg.map.MapManager;
import rpg.movement.InteractionManager;
import rpg.save.SaveManager;

/**
 * ...
 * @author Kevin
 */
@:allow(rpg)
class Engine
{
	public var currentMap(get, never):GameMap;
	public var config(default, null):Config;
	
	private var impl:IImplementation;
	private var assetManager:IAssetManager;
	
	private var mapManager:MapManager;
	private var eventManager:EventManager;
	private var inputManager:InputManager;
	private var interactionManager:InteractionManager;
	private var saveManager:SaveManager;
	private var itemManager:ItemManager;
	private var imageManager:ImageManager;
	
	private var gameState(default, set):GameState;
	
	private var delayedCalls:Array<DelayedCall>;
	private var called:Array<DelayedCall>;
	
	public function new(impl:IImplementation, assetManager:IAssetManager) 
	{
		this.impl = impl;
		this.assetManager = assetManager;
		
		loadConfig();
		
		impl.engine = this;
		impl.init();
		delayedCalls = [];
		called = [];
		
		mapManager = new MapManager(this);
		eventManager = new EventManager(this);
		inputManager = new InputManager(this);
		interactionManager = new InteractionManager(this);
		saveManager = new SaveManager(this);
		itemManager = new ItemManager(this);
		imageManager = new ImageManager(this);
		
		gameState = SMainMenu;
	}
	<commit_msg>The editor isn't a real game...<commit_after>package rpg;
import haxe.Json;
import haxe.Timer;
import hscript.Interp;
import hscript.Parser;
import impl.IAssetManager;
import impl.IImplementation;
import rpg.config.Config;
import rpg.event.EventManager;
import rpg.image.ImageManager;
import rpg.input.InputManager;
import rpg.item.ItemManager;
import rpg.map.GameMap;
import rpg.map.MapManager;
import rpg.movement.InteractionManager;
import rpg.save.SaveManager;

/**
 * ...
 * @author Kevin
 */
@:allow(rpg)
class Engine
{
	public var currentMap(get, never):GameMap;
	public var config(default, null):Config;
	
	private var impl:IImplementation;
	private var assetManager:IAssetManager;
	
	private var mapManager:MapManager;
	private var eventManager:EventManager;
	private var inputManager:InputManager;
	private var interactionManager:InteractionManager;
	private var saveManager:SaveManager;
	private var itemManager:ItemManager;
	private var imageManager:ImageManager;
	
	private var gameState(default, set):GameState;
	
	private var delayedCalls:Array<DelayedCall>;
	private var called:Array<DelayedCall>;
	
	public function new(impl:IImplementation, assetManager:IAssetManager) 
	{
		this.impl = impl;
		this.assetManager = assetManager;
		
		#if !RPG_ENGINE_EDITOR
		loadConfig();
		
		impl.engine = this;
		impl.init();
		delayedCalls = [];
		called = [];
		
		mapManager = new MapManager(this);
		eventManager = new EventManager(this);
		inputManager = new InputManager(this);
		interactionManager = new InteractionManager(this);
		saveManager = new SaveManager(this);
		itemManager = new ItemManager(this);
		imageManager = new ImageManager(this);
		
		gameState = SMainMenu;
		#end
	}
	
{'fraction_non_alphanumeric': 0.0982089552238806, 'fraction_numerical': 0.0, 'mean_word_length': 5.494186046511628, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '709843', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1021, 'n_words': 246}