package  
{
	import flash.events.MouseEvent;
	import flinjin.Flinjin;
	import flinjin.graphics.Layer;
	import flinjin.graphics.Sprite;
	import Game.GameMain;
	
	/**
	 * ...
	 * @author Michael Miriti
	 */
	public class Menu extends Layer 
	{
		[Embed(source="bmp/menu/menu.png")]
		private static var _menuBitmap:Class;
		
		[Embed(source="bmp/menu/play.png")]
		private static var _playBitmap:Class;
		private var _playSprite:Sprite = new Sprite(new _playBitmap());
		
		public function Menu() 
		{
			super(Flinjin.sceneWidth, Flinjin.sceneHeight);
			
			addSprite(new Sprite(new GameMain._skyBitmap()));
			addSprite(new Sprite(new _menuBitmap()));
			
			_playSprite.setCenterInBitmapCenter();
			_playSprite.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
			addSprite(_playSprite, width / 2, height / 2 + height/8);
		}
		
		private function onMouseDown(e:MouseEvent):void 
		{
			Flinjin.Instance.Camera.LookAt(new GameMain());
		}
		
	}

}