<commit_before>package aerys.minko.scene.controller
{
	import aerys.minko.render.Viewport;
	import aerys.minko.scene.node.ISceneNode;
	import aerys.minko.scene.node.Scene;
	import aerys.minko.type.KeyboardManager;
	import aerys.minko.type.MouseManager;
	
	import flash.display.BitmapData;
	import flash.utils.Dictionary;

	public class ScriptController extends EnterFrameController
	{
        private var _scene          : Scene;
        private var _started        : Dictionary;
		private var _lastTime		: Number;
		private var _deltaTime		: Number;
		private var _currentTarget	: ISceneNode;
		private var _viewport		: Viewport;
		
        protected function get scene() : Scene
        {
            return _scene;
        }
        
		protected function get deltaTime() : Number
		{
			return _deltaTime;
		}
		
		protected function get keyboard() : KeyboardManager
		{
			return _viewport.keyboardManager;
		}
		
		protected function get mouse() : MouseManager
		{
			return _viewport.mouseManager;
		}
		
		protected function get viewport() : Viewport
		{
			return _viewport;
		}
		
		public function ScriptController(targetType	: Class = null)
		{
			super(targetType);
		}
        
        override protected function targetAddedToSceneHandler(target    : ISceneNode,
                                                              scene     : Scene) : void
        {
            if (_scene && scene != _scene)
                throw new Error(
                    'The same ScriptController instance can not be used in more than one scene ' +
                    'at a time.'
                );
            
            _scene = scene;
        }
        
        override protected function targetRemovedFromSceneHandler(target    : ISceneNode,
                                                                  scene     : Scene) : void
        {
            if (numTargetsInScene == 0)
                _scene = null;
        }
        
		override protected function sceneEnterFrameHandler(scene		: Scene,
														   viewport		: Viewport,
														   destination	: BitmapData,
														   time			: Number) : void
		{
			_viewport = viewport;
			_deltaTime = _lastTime - time;
			_lastTime = time;
			
            beforeUpdate();<commit_msg>fix missing init of ScriptController._started<commit_after>package aerys.minko.scene.controller
{
	import aerys.minko.render.Viewport;
	import aerys.minko.scene.node.ISceneNode;
	import aerys.minko.scene.node.Scene;
	import aerys.minko.type.KeyboardManager;
	import aerys.minko.type.MouseManager;
	
	import flash.display.BitmapData;
	import flash.utils.Dictionary;

	public class ScriptController extends EnterFrameController
	{
        private var _scene          : Scene;
        private var _started        : Dictionary;
		private var _lastTime		: Number;
		private var _deltaTime		: Number;
		private var _currentTarget	: ISceneNode;
		private var _viewport		: Viewport;
		
        protected function get scene() : Scene
        {
            return _scene;
        }
        
		protected function get deltaTime() : Number
		{
			return _deltaTime;
		}
		
		protected function get keyboard() : KeyboardManager
		{
			return _viewport.keyboardManager;
		}
		
		protected function get mouse() : MouseManager
		{
			return _viewport.mouseManager;
		}
		
		protected function get viewport() : Viewport
		{
			return _viewport;
		}
		
		public function ScriptController(targetType	: Class = null)
		{
			super(targetType);
		}
        
        protected function initialize() : void
        {
            _started = new Dictionary(true);
        }
        
        override protected function targetAddedToSceneHandler(target    : ISceneNode,
                                                              scene     : Scene) : void
        {
            if (_scene && scene != _scene)
                throw new Error(
                    'The same ScriptController instance can not be used in more than one scene ' +
                    'at a time.'
                );
            
            _scene = scene;
        }
        
        override protected function targetRemovedFromSceneHandler(target    : ISceneNode,
                                                                  scene     : Scene) : void
        {
            if (numTargetsInScene == 0)
                _scene = null;
        }
        
		override protected function sceneEnterFrameHandler(scene		: Scene,
														   viewport		: Viewport,
														   destination	: BitmapData,
														   time			: Number) : void
		{
			_viewport = viewport;
			_deltaTime = _lastTime - time;
			_lastTime = time;
			
            beforeUpdate();
{'fraction_non_alphanumeric': 0.06582603120324856, 'fraction_numerical': 0.00042744176106005556, 'mean_word_length': 1.7114716106604866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2008619', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1213, 'n_words': 314}