Ejemplo n.º 1
0
        public bool HasHitBarrier(List <Barrier> barriers_)
        {
            foreach (Barrier b in barriers_)
            {
                EntityCollider fuckDean          = new EntityCollider(m_collider);
                Vector2        m_newPosition     = fuckDean.GetPosition() + m_velocity;
                Vector2        m_barrierPosition = b.GetPosition();

                fuckDean.SetPosition(m_collider.GetPosition() + m_velocity);

                if (CollisionHandler.CheckForCollision(fuckDean, b.GetCollider()))
                {
                    Debug.AddText(new DebugText("New Position = " + m_newPosition, new Vector2(10.0f, 180.0f)));

                    return(true);
                }
            }
            return(false);
        }