// Path: demos-core/src/com/matthewmichelotti/collider/demos/Component.java
// public abstract class Component implements Comparable<Component> {
// 	private static int NEXT_ID = 0;
// 	private final int id;
// 	private HBPositioned hitBox;
// 
// 	protected Component(HBPositioned hitBox) {
// 		if(hitBox == null) throw new IllegalArgumentException();
// 		this.hitBox = hitBox;
// 		hitBox.setOwner(this);
// 		id = NEXT_ID++;
// 		Game.engine.addComp(this);
// 	}
// 
// 	protected final void delete() {
// 		if(hitBox == null) return;
// 		Game.engine.removeComp(this);
// 		hitBox.free();
// 		hitBox = null;
// 	}
// 	
// 	protected final boolean isInBounds() {return Game.engine.isInBounds(hitBox);}
// 	public final boolean isDeleted() {return hitBox == null;}
// 	public final int getId() {return id;}
// 	
// 	public final HBPositioned hitBox() {return hitBox;}
// 	public final HBCircle circ() {return (HBCircle)hitBox;}
// 	public final HBRect rect() {return (HBRect)hitBox;}
// 	public final boolean isRect() {return hitBox instanceof HBRect;}
// 	public final boolean isCirc() {return hitBox instanceof HBCircle;}
// 	
// 	public abstract void onCollide(Component other);
// 	public abstract void onSeparate(Component other);
// 	public abstract boolean canInteract(Component other);
// 	public abstract boolean interactsWithBullets();
// 	public abstract Color getColor();
// 	public String getMessage() {return null;}
// 	
// 	@Override public final int compareTo(Component o) {
// 		return id - o.id;
// 	}
// }
// 
// Path: demos-core/src/com/matthewmichelotti/collider/demos/Game.java
// public class Game {
// 	public final static GameEngine engine = new GameEngine();
// 	public final static Random rand = new Random();
// 	
// 	private Game() {}
// }


import com.badlogic.gdx.graphics.Color;
import com.matthewmichelotti.collider.demos.Component;
import com.matthewmichelotti.collider.demos.Game;
/*
 * Copyright 2013-2014 Matthew D. Michelotti
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.matthewmichelotti.collider.demos.comps;


/**
 * Indicates how many bullets are overlapping with this Component.
 * @author Matthew Michelotti
 */
public class CIndicator extends Component {
	private static Color LO_COLOR = new Color(0.0f, 0.0f, 0.3f, 1.0f);
	private static Color HI_COLOR = new Color(0.2f, 0.8f, 1.0f, 1.0f);
	
	private int overlaps = 0;
	private Color blendColor = new Color();

	public CIndicator(double x, double y, boolean isRect) {
// Path: demos-core/src/com/matthewmichelotti/collider/demos/Component.java
// public abstract class Component implements Comparable<Component> {
// 	private static int NEXT_ID = 0;
// 	private final int id;
// 	private HBPositioned hitBox;
// 
// 	protected Component(HBPositioned hitBox) {
// 		if(hitBox == null) throw new IllegalArgumentException();
// 		this.hitBox = hitBox;
// 		hitBox.setOwner(this);
// 		id = NEXT_ID++;
// 		Game.engine.addComp(this);
// 	}
// 
// 	protected final void delete() {
// 		if(hitBox == null) return;
// 		Game.engine.removeComp(this);
// 		hitBox.free();
// 		hitBox = null;
// 	}
// 	
// 	protected final boolean isInBounds() {return Game.engine.isInBounds(hitBox);}
// 	public final boolean isDeleted() {return hitBox == null;}
// 	public final int getId() {return id;}
// 	
// 	public final HBPositioned hitBox() {return hitBox;}
// 	public final HBCircle circ() {return (HBCircle)hitBox;}
// 	public final HBRect rect() {return (HBRect)hitBox;}
// 	public final boolean isRect() {return hitBox instanceof HBRect;}
// 	public final boolean isCirc() {return hitBox instanceof HBCircle;}
// 	
// 	public abstract void onCollide(Component other);
// 	public abstract void onSeparate(Component other);
// 	public abstract boolean canInteract(Component other);
// 	public abstract boolean interactsWithBullets();
// 	public abstract Color getColor();
// 	public String getMessage() {return null;}
// 	
// 	@Override public final int compareTo(Component o) {
// 		return id - o.id;
// 	}
// }
// 
// Path: demos-core/src/com/matthewmichelotti/collider/demos/Game.java
// public class Game {
// 	public final static GameEngine engine = new GameEngine();
// 	public final static Random rand = new Random();
// 	
// 	private Game() {}
// }


// Path: demos-core/src/com/matthewmichelotti/collider/demos/comps/CIndicator.java
import com.badlogic.gdx.graphics.Color;
import com.matthewmichelotti.collider.demos.Component;
import com.matthewmichelotti.collider.demos.Game;

/*
 * Copyright 2013-2014 Matthew D. Michelotti
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.matthewmichelotti.collider.demos.comps;


/**
 * Indicates how many bullets are overlapping with this Component.
 * @author Matthew Michelotti
 */
public class CIndicator extends Component {
	private static Color LO_COLOR = new Color(0.0f, 0.0f, 0.3f, 1.0f);
	private static Color HI_COLOR = new Color(0.2f, 0.8f, 1.0f, 1.0f);
	
	private int overlaps = 0;
	private Color blendColor = new Color();

	public CIndicator(double x, double y, boolean isRect) {
		super(isRect ? Game.engine.makeRect() : Game.engine.makeCircle());