<commit_before>﻿package net.flashpunk
{
	import flash.geom.Point;
	
	/**
	 * Base class for all graphical types that can be drawn by Entity.
	 */
	public class Graphic
	{
		/**
		 * If the graphic is visible.
		 */
		public var visible:Boolean = true;
		
		/**
		 * X offset.
		 */
		public var x:Number = 0;
		
		/**
		 * Y offset.
		 */
		public var y:Number = 0;
		
		/**
		 * X scrollfactor, effects how much the camera offsets the drawn graphic.
		 * Can be used for parallax effect, eg. Set to 0 to follow the camera,
		 * 0.5 to move at half-speed of the camera, or 1 (default) to stay still.
		 */
		public var scrollX:Number = 1;
		
		/**
		 * Y scrollfactor, effects how much the camera offsets the drawn graphic.
		 * Can be used for parallax effect, eg. Set to 0 to follow the camera,
		 * 0.5 to move at half-speed of the camera, or 1 (default) to stay still.
		 */
		public var scrollY:Number = 1;
		
		/**
		 * If the graphic should render at its position relative to its parent Entity's position.
		 */
		public var relative:Boolean = true;
		
		/**
		 * Constructor.
		 */
		public function Graphic() 
		{
			
		}
		
		/**
		 * Renders the graphic to the screen buffer.
		 * @param	point		The position to draw the graphic.
		 * @param	camera		The camera offset.
		 */
		public function render(point:Point, camera:Point):void
		{
			
		}
		
		/** @private Callback for when the graphic is assigned to an Entity. */
		protected function get assign():Function { return _assign; }<commit_msg>Added update() to Graphic class and active property to turn on/off updating, used for animated Entitites.<commit_after>﻿package net.flashpunk
{
	import flash.geom.Point;
	
	/**
	 * Base class for all graphical types that can be drawn by Entity.
	 */
	public class Graphic
	{
		/**
		 * If the graphic should update.
		 */
		public var active:Boolean = false;
		
		/**
		 * If the graphic should render.
		 */
		public var visible:Boolean = true;
		
		/**
		 * X offset.
		 */
		public var x:Number = 0;
		
		/**
		 * Y offset.
		 */
		public var y:Number = 0;
		
		/**
		 * X scrollfactor, effects how much the camera offsets the drawn graphic.
		 * Can be used for parallax effect, eg. Set to 0 to follow the camera,
		 * 0.5 to move at half-speed of the camera, or 1 (default) to stay still.
		 */
		public var scrollX:Number = 1;
		
		/**
		 * Y scrollfactor, effects how much the camera offsets the drawn graphic.
		 * Can be used for parallax effect, eg. Set to 0 to follow the camera,
		 * 0.5 to move at half-speed of the camera, or 1 (default) to stay still.
		 */
		public var scrollY:Number = 1;
		
		/**
		 * If the graphic should render at its position relative to its parent Entity's position.
		 */
		public var relative:Boolean = true;
		
		/**
		 * Constructor.
		 */
		public function Graphic() 
		{
			
		}
		
		/**
		 * Updates the graphic.
		 */
		public function update():void
		{
			
		}
		
		/**
		 * Renders the graphic to the screen buffer.
		 * @param	point		The position to draw the graphic.
		 * @param	camera		The camera offset.
		 */
		public function render(point:Point, camera:Point):void
		{
			
		}
		
		/** @private Callback for when the graphic is assigned to an Entity. */
		protected function get assign():Function { return _assign; }
{'fraction_non_alphanumeric': 0.09795544705523344, 'fraction_numerical': 0.00732377174244736, 'mean_word_length': 2.44327731092437, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3274034', 'n_tokens_mistral': 1179, 'n_tokens_neox': 923, 'n_words': 408}