Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        // Initialize text bubble
        bubbleObject = new GameObject();
        TextMesh     mesh     = bubbleObject.AddComponent <TextMesh>();
        MeshRenderer renderer = bubbleObject.AddComponent <MeshRenderer>();
        InfoBubble   bubble   = bubbleObject.AddComponent <InfoBubble>();

        // Also find the other camera for easy access
        Camera[]   cameras = GameObject.FindObjectsOfType <Camera>();
        GameObject guess   = cameras[0].gameObject;

        otherCameraObject = (this.gameObject != guess) ? guess : cameras[1].gameObject;
    }
        internal void AddBubble(InfoBubble bubble)
        {
            if (null == bubble)
                throw new ArgumentNullException("bubble");

            this.bubbleCollection.Add(bubble.BubbleId, bubble);
        }