SpeechBubble class to create and manage the bubble with text.
Inheritance: UnityEngine.MonoBehaviour
		void Awake ()
		{
			bubble = gameObject.transform.parent.GetComponent<SpeechBubble>();
			Log.Assert(bubble, 
				"Missing SpeechBubble from parent of 'x' button in:"+gameObject.name);


		}
コード例 #2
0
        //NPC npc;
        // Use this for initialization
        void Start()
        {
            gameObject.name = id;
            npc = NpcModels.Instance.Get(id);
            Log.Assert(npc != null, "Missing NPC:"+id);

            //image = (UIImage)UIManager.Instance.Get(gameObject.GetInstanceID());
            Log.Assert(image != null, "NO uiImage found as: "+gameObject.name);

            bubble = CreateBubble(id);
        }
コード例 #3
0
        /// <summary>
        /// Close the bubble by name
        /// </summary>
        public void CloseBubble(SpeechBubble obj)
        {
            //handle close from bubble
            UIDialog d = ui.GetDialog(obj.Id);
            // // Log.GameTimes("_________________________________________ X clicked on:"+obj.Id+ ", Emotion "+obj.name);// + d.Emotion);

            // emotion tagging :
            string closeEmotion = "close"+ d.Emotion;
            //if(closeEmotion.Contains("close")) // // Log.GameTimes("Contains:");
            GameManager.Instance.Event("DIALOG", obj.Id, closeEmotion);
        }