Пример #1
0
    public static void ResolveCollision(GameObject collider1, GameObject collider2, Collision2D collision)
    {
        IGameCollision gameColl = Collisions.Find(item => (collider1.CompareTag(item.Collider1Tag)) && (collider2.CompareTag(item.Collider2Tag)));

        if (gameColl != null)
        {
            gameColl.Resolve(collider1, collider2, collision);
        }
    }
Пример #2
0
    public static void ResolveCollision(GameObject collider1, GameObject collider2, Collider2D collider)
    {
        IGameCollision gameColl = Collisions.Find(item => (collider1.CompareTag(item.Collider1Tag)) && (collider2.CompareTag(item.Collider2Tag)));

        if (gameColl != null)
        {
            gameColl.Resolve(collider1, collider2, collider);
        }
        else
        {
            Debug.Log(string.Format("Collision not configured: '{0}' - '{1}'.", collider1.tag, collider2.tag));
        }
    }