package Game{
	public class GhostBashful extends Ghost{
		override public function makeTarget():void{
			switch (Mode){
				case 0: // HOME
				break;
				
				case 1: // CHASE
					
					var PacManfront:Object = new Object();
					var Shadow:Chost = parent.getChildByName('Shadow');
					
					switch(pm.Direction){
						case 1:
							PacManfront.x = Math.floor(pm.x / 8) - 2;
							PacManfront.y = Math.floor(pm.y / 8);
						break;
						
						case 2:
							PacManfront.x = Math.floor(pm.x / 8) + 2;
							PacManfront.y = Math.floor(pm.y / 8);
						break;
						
						case 3:
							PacManfront.x = Math.floor(pm.x / 8);
							PacManfront.y = Math.floor(pm.y / 8) - 2;
						break;
						
						case 4:
							PacManfront.x = Math.floor(pm.x / 8);
							PacManfront.y = Math.floor(pm.y / 8) + 2;
						break;
					}		
					
					TargetPoint.x = (PacManfront.x - Math.floor(Shadow.x / 8)) * 2;
					TargetPoint.y = (PacManfront.y - Math.floor(Shadow.y / 8)) * 2;
					
				break;
				
				case 2: // SCATTER
					TargetPoint.x = (parent as Level).Map.Fields.length;
					TargetPoint.y = (parent as Level).Map.Fields[0].length;
				break;
				
				case 3: // FRIGHTENED
				break;
				
				case 4: // RUNAWAY
					TargetPoint.x = (parent as Level).Map.GhostHouse.x;
					TargetPoint.y = (parent as Level).Map.GhostHouse.y;
				break;
			}			
		}
	}
}
