using UnityEngine;
using System.Collections;
using CharacterEngine.Primitives;

public class test : MonoBehaviour {

    public BoxCollider2D coll;
    protected CECollider ce;
	// Use this for initialization
	void Start () {
        ce = new CECollider(coll);
	}
	
	// Update is called once per frame
	void Update () {
        if (ce.ContainsPoint(transform.position))
        {
            Vector2 p = CECollision.ClosestPointInBounds(ce, transform.position);
            Debug.DrawLine(p, transform.position, Color.red);
        }
	}
}
