void Start() { transform.position = grid.GetRandomRoadPosition(); currentWaypoint = transform.position; GetNewDestination(); bubble = Instantiate(sbcPrefab, transform.position + new Vector3(0.2f, 0.1f, 0), transform.rotation) as SpeechBubbleController; bubble.transform.parent = gameObject.transform; }
public void StartSpeechBubble(string message, int seconds, Entity _sendingEntity, SpeechBubbleController _controller) { speechLabel.text = message; fadeInSeconds = seconds; sendingEntity = _sendingEntity; controller = _controller; this.gameObject.SetActive(true); }
void Start() { anim = GetComponent <Animator>(); anim.SetBool("Alive", true); transform.position = grid.GetRandomRoadPosition(); currentWaypoint = transform.position; GetNewDestination(); bubble = Instantiate(sbcPrefab, transform) as SpeechBubbleController; bubble.transform.parent = gameObject.transform; }
void Start() { anim = GetComponent <Animator>(); anim.SetBool("isEating", isEating); if (detectCheeses != null && detectCheeses.Length > 0) { cheeseAreaTop = transform.Find("CheeseAreaTop"); cheeseAreaBottom = transform.Find("CheeseAreaBottom"); } bubble = GetComponentInChildren <SpeechBubbleController>(true); }
// Use this for initialization void Start() { cat = GameObject.FindGameObjectWithTag("Player"); rat = GameObject.FindGameObjectWithTag("Rat"); bubble = rat.GetComponentInChildren <SpeechBubbleController>(true); ratAnim = rat.GetComponent <Animator> (); dogAnim = dog.GetComponent <Animator>(); guic = GameObject.Find("Canvas/GameUI").GetComponent <GameUIController> (); bossCtrlr = dog.GetComponent <BulldogBossController>(); startPlatform = ratUp; bossCtrlr.OnDeath += OnBossDeath; }
public SpeechBubblePanel3D CreateNewSpeechBubblePanel(Transform parent, string message, Entity sendingEntity, SpeechBubbleController _controller) { GameObject new_go = (GameObject) Instantiate (this.gameObject); new_go.transform.parent = parent; new_go.transform.position = new Vector3(parent.position.x, new_go.transform.position.y, parent.position.z); // get new component, set message, and show SpeechBubblePanel3D new_component = new_go.GetComponent<SpeechBubblePanel3D>(); new_component.StartSpeechBubble(message, fadeInSeconds, sendingEntity, _controller); return new_component; }
public SpeechBubblePanel3D CreateNewSpeechBubblePanel(Transform parent, string message, Entity sendingEntity, SpeechBubbleController _controller) { GameObject new_go = (GameObject)Instantiate(this.gameObject); new_go.transform.parent = parent; new_go.transform.position = new Vector3(parent.position.x, new_go.transform.position.y, parent.position.z); // get new component, set message, and show SpeechBubblePanel3D new_component = new_go.GetComponent <SpeechBubblePanel3D>(); new_component.StartSpeechBubble(message, fadeInSeconds, sendingEntity, _controller); return(new_component); }
private void Start() { winLabel.SetActive(false); loseLabel.SetActive(false); TheoremConfig theorem = theorems[Random.Range(0, theorems.Length)]; theoremSymbols = theorem.GetTheoremSymbols(); hilbert = FindObjectOfType <Hilbert>(); speechController = FindObjectOfType <SpeechBubbleController>(); levelController = FindObjectOfType <LevelController>(); symbolSpawner = FindObjectOfType <SymbolSpawner>(); symbolSpawner.SetTheoremImage(theorem); StartCoroutine(symbolSpawner.SpawnSymbols(theorem)); }
public void LoadSpeechBubble(XmlNode node, ref SpeechBubbleController bubble) { foreach (XmlNode child in node.ChildNodes) { switch (child.Name) { case "text": bubble.gameObject.SetActive(!string.IsNullOrEmpty(child.InnerText)); bubble.text = child.InnerText; break; case "direction": bubble.flipBubble = (BubbleDirection)System.Enum.Parse(typeof(BubbleDirection), child.InnerText) == BubbleDirection.RIGHT; break; } } }
// Start is called before the first frame update void Start() { textLoader_ = TextLoader.Instance; mainSpeechBubbleCompleted_ = new UnityEvent(); mainSpeechBubbleCompleted_.AddListener(ProceedToNextNode); if (testBubble_ == null) { testBubble_ = GameObject.FindObjectOfType <SpeechBubbleController>(); } Dialogue dialogue1 = new Dialogue(textLoader_.GetDialogues(1), mainSpeechBubbleCompleted_, 5.0f, 40.0f, Dialogue.BubbleSize.Small, 8.0f); Dialogue dialogue2 = new Dialogue(textLoader_.GetDialogues(0), mainSpeechBubbleCompleted_); DialogueNode node2 = new DialogueNode(dialogue1, null); currNode_ = new DialogueNode(dialogue2, node2); ProcessDialogueNode(); }