Exemplo n.º 1
0
    void CheckCollision(Collision collision)
    {
        /*
         * if (collision.gameObject.tag.Equals(GameManager.FloorTag) || collision.gameObject.tag.Equals(GameManager.RotationArenaTag))
         * {
         *  if (!isAi)
         *      botController.TriggeredGround();
         * }
         *
         * if (collision.gameObject.tag.Equals(GameManager.AiTag))
         * {
         *  if (!isAi)
         *      botController.TriggeredAi();
         * }
         */

        if (collision.gameObject.tag.Equals(GameManager.HoleTag))
        {
            if (!isAi)
            {
                botController.BotEnteredHole();
            }
        }

        if (collision.gameObject.tag.Equals(GameManager.BotTag))
        {
            if (isAi)
            {
                aiController.Triggered(collision.contacts, collision);
            }
        }
    }