public virtual void OnTriggerExit2D(Collider2D other)
{
// If you exit a moving platform, detach from it
if (other.gameObject.tag == "moving")
{
float xPos = transform.position.x;
transform.SetParent(null);
transform.position = new Vector3(xPos,transform.position.y,0.0f);
}
// If you exit the stage boundaries, DIE
if (other.gameObject.tag == "DeathBoundary")
{
//OnDeath ();
if (!CharacterBehavior.Dying){
PlayerAnim.SetBool ("FallDeath", true);
CharacterBehavior.Dying = true;
}
}
}