package classes.matuto.mtGame
{
	import flash.display.MovieClip;
	import flash.ui.Keyboard;
	
	public class ObjectGame extends MovieClip
	{
		
		public var power    :Number 		 = 0.3;
		public var yspeed   :Number 		 = 0;
		public var xspeed	:Number 	 	 = 0;
		public var friction :Number	     	 = 0.8;
		public var limites	:Object 		 = new Object();
		
		
		public function ObjectGame()
		{
			super();
		}
		
		public function moveXMais():void
		{
			xspeed 	*= friction;
			x 	    += xspeed;	
		}
		
		public function moveXMenos():void
		{
			xspeed 	*= friction;
			x 	    -= xspeed;	
		}
		
		public function testeLimiteMenorX(value:Number):Boolean
		{
			if(x-(width>>1)<=value)
			return false;
			else
			return true;
		}
		
		public function testeLimiteMaiorX(value:Number):Boolean
		{
			if(x+(width>>1)>=value)
			return false;
			else
			return true;
		}
		
		
	
		
		
	}//end class
}