void StartProtocol() { if (!shouldEnable()) { return; } tutorialText.text = "Place the cursor on the box by gazing at it. Then Air-Tap to continue"; AnimatedText dialogScreenAnimatedText = infoDialog.AddComponent <AnimatedText>() as AnimatedText; dialogScreenAnimatedText.textToSpeech = sceneManager.GetComponent <TextToSpeech>(); dialogScreenAnimatedText.strings = strings; AnimatedText dialogScreenAnimatedText2 = infoDialog2.AddComponent <AnimatedText>() as AnimatedText; dialogScreenAnimatedText2.textToSpeech = sceneManager.GetComponent <TextToSpeech>(); dialogScreenAnimatedText2.strings = strings2; infoDialog.SetActive(true); sceneTimeStep = 0; childModel.SendMessage("DeactiveEmoScreen"); childModel.SetActive(false); directionIndicator.HideIndicator(); }
public void StartProtocol() { if (!shouldEnable()) { return; } AnimatedText dialogScreenAnimatedText = dialogScreen.AddComponent <AnimatedText>() as AnimatedText; dialogScreenAnimatedText.textToSpeech = sceneManager.GetComponent <TextToSpeech>(); dialogScreenAnimatedText.strings = new string[] { // "Depression has negative neurological effects on your brain. The brain has an arrangement of neural pathways that contain neurons that allow electrical signals to be sent to different parts of the body." "During this stage, you will start to form a connection with your inner-child. You must imagine this child is a true representation of your younger self.", "Your inner-child will become sad during times of distress.", "However, during positive moments in your life your inner-child will express happiness.", "Great! Hopefully you feel more connected with your inner-child.", "Let’s continue improve this connection. Embracing your inner-child is a great way to do this.", "Excellent! Now your connection with your inner child has increased" }; dialogScreenAnimatedText.enabled = true; child.SendMessage("DeactiveEmoScreen"); child.SendMessage("SetSadEmotion"); dialogScreen.SetActive(true); }
public void TalkCanvasToggle() { Canvas talkCanvas = GameManager.gm.GetTalkCanvas(); talkCanvas.gameObject.SetActive(true); AnimatedText at = talkCanvas.GetComponentInChildren <AnimatedText>(); if (questActive && !calledUpon) { at.SetComponents(this, this.message); johnny.calledUpon = true; johnny.DeepTalkBubbleActivate(); } else if (mimi != null && mimi.questActive) { List <AnimatedText.MessagePacket> survMsgs = new List <AnimatedText.MessagePacket> { new AnimatedText.MessagePacket(this, this.firstMimi), new AnimatedText.MessagePacket(mimi, mimi.firstRequest), new AnimatedText.MessagePacket(this, this.secondMimi), new AnimatedText.MessagePacket(mimi, mimi.secondRequest), new AnimatedText.MessagePacket(this, this.thirdMimi), new AnimatedText.MessagePacket(mimi, mimi.thirdRequest) }; at.SetComponents(survMsgs); mimi.UpdateQuestDesc(); } }
void Start() { voice = GetComponentInChildren <AudioSource> (); animatedText = conversationCanvas.GetComponentInChildren <AnimatedText> (); agent = GetComponent <NavMeshAgent> (); meshRenderer = GetComponentInChildren <MeshRenderer> (); }
public void TalkCanvasToggle() { Canvas talkCanvas = GameManager.gm.GetTalkCanvas(); talkCanvas.gameObject.SetActive(true); AnimatedText at = talkCanvas.GetComponentInChildren <AnimatedText>(); if (questActive && !calledUpon) { at.SetComponents(this, this.message); // TODO: Finding clones will become problematic. How are we gonna handle this? GameObject mimiObject = GameObject.Find("Mimi(Clone)"); Mimi mimi = mimiObject.GetComponent <Mimi>(); mimi.calledUpon = true; mimi.DeepTalkBubbleActivate(); } else if (maddie.questActive) { List <AnimatedText.MessagePacket> survMsgs = new List <AnimatedText.MessagePacket> { new AnimatedText.MessagePacket(this, this.firstMaddie), new AnimatedText.MessagePacket(maddie, maddie.firstRequest), new AnimatedText.MessagePacket(this, this.secondMaddie), new AnimatedText.MessagePacket(maddie, maddie.secondRequest), new AnimatedText.MessagePacket(this, this.thirdMaddie), new AnimatedText.MessagePacket(maddie, maddie.thirdRequest) }; at.SetComponents(survMsgs); maddie.UpdateQuestDesc(); } }
public void TalkCanvasToggle() { Canvas talkCanvas = GameManager.gm.GetTalkCanvas(); talkCanvas.gameObject.SetActive(true); AnimatedText at = talkCanvas.GetComponentInChildren <AnimatedText>(); if (questActive && !calledUpon) { at.SetComponents(this, this.message); // TODO: Finding clones will become problematic. How are we gonna handle this? GameObject maddieObject = GameObject.Find("Maddie"); Maddie maddie = maddieObject.GetComponent <Maddie>(); maddie.calledUpon = true; maddie.SetMimi(this); maddie.DeepTalkBubbleActivate(); } else if (johnny.questActive) { List <AnimatedText.MessagePacket> survMsgs = new List <AnimatedText.MessagePacket> { new AnimatedText.MessagePacket(this, this.firstJohnny), new AnimatedText.MessagePacket(johnny, johnny.firstRequest), new AnimatedText.MessagePacket(this, this.secondJohnny) }; at.SetComponents(survMsgs); johnny.UpdateQuestDesc(); } }
private void StartProtocol() { if (!shouldEnable()) { return; } microphoneManager = GetComponent <MicrophoneManager>(); AnimatedText dialogScreenAnimatedText = dialogScreen.AddComponent <AnimatedText>() as AnimatedText; dialogScreenAnimatedText.textToSpeech = sceneManager.GetComponent <TextToSpeech>(); dialogScreenAnimatedText.strings = new string[] { "Now you will perform exercises which will help you form and maintain a loving relationship with your inner-child.", "Now you feel better connected with your inner-child...", "It is important you love your inner-child and vow to comfort it during its times of need.", "To show your love for your inner-child, think of one of your favourite songs from your childhood (e.g. a love song)", "Nicely done!!! Your song has made the inner-child feel more loved", "Now let's move on to more activities to increase the bond you have with your inner-child.", "Giving yourself a massage is a great way to relieve stress and relax. You can massage any part of your body including your arms, neck and face.", "Excellent!!! Your efforts have made your inner-child feel more loved and connected with you", "Now let's revisit our soothing song... we can sing this song when we are in times of stress to remind us of the importance of comforting our inner-child. Slowly moving our body to the rhytm also helps with this exercise.", "Hence we must practice comfortably and intutively singing this song often to remind you of your connection to your inner-child and help you feel the happiness associated with the song", "Excellent!!!, your song has made your inner-child much happier", "It is very important that you remember to sing this song whenever you feel distressed. It will remind you of your loving bond with your inner-child who you want to feel the happiness associated with song.", "Practice singing to your inner-child until the action becomes intuitive and natural. Now to complete this stage... We must practice reciting important phrases to our inner-child.", "Excellent!!! continue to practice these activities continuously so you can use them to improve your mood in connection with your inner-child." }; dialogScreenAnimatedText.enabled = true; child.SendMessage("DeactiveEmoScreen"); child.SendMessage("SetNeutralEmotion"); dialogScreen.SetActive(true); }
public void Awake() { instance = this; selectedInstruments = new List <Instrument>(); animatedText = GetComponent <AnimatedText>(); if (displays == null) { displays = FindObjectsOfType <OptionDisplay>(); } displayInstruments = options.Select(i => i.instrument).ToArray(); string a = ""; foreach (Instrument i in displayInstruments) { a += $"{i} "; } Debug.Log("Copied instruments from available options: " + a); points = 0; accumulated = 0; poolInstance = displayInstruments.ToList(); oldInstruments = displayInstruments.ToList(); Setup(); }
private AnimatedText CreateAnimatedText(AnimatedText prefab, List <AnimatedText> pool) { var text = Instantiate(prefab, transform); pool.Add(text); return(text); }
private AnimatedText GetExistingAnimatedText(AnimatedText prefab, List <AnimatedText> pool) { foreach (var text in pool) { if (!text.gameObject.activeSelf) { return(text); } } return(null); }
// Use this for initialization void Start() { dialogue = ""; characterName = ""; pose = 0; position = "L"; playerTalking = true; parser = GameObject.Find("DialogueParser").GetComponent <DialogueParser>(); animatedText = GameObject.Find("TextBox").GetComponent <AnimatedText>(); transition = GameObject.Find("AnimPanel").GetComponent <Animator>(); charAnimator = GameObject.Find("GamePanel").GetComponent <Animator>(); cameraAnimator = GameObject.Find("Main Camera").GetComponent <Animator>(); thingy = GameObject.Find("thingy"); lineNum = -1; playerName = PlayerPrefs.GetString("name"); }
private static bool TryReplaceAnimatedText(string key, ref string newText) { if (!ReplaceAnimatedText) { return(false); } string value; if (AnimatedText.TryGetValue(key, out value)) { newText = value; return(true); } return(false); }
private void StartProtocol() { if (!shouldEnable()) { return; } microphoneManager = GetComponent <MicrophoneManager>(); AnimatedText dialogScreenAnimatedText = dialogScreen.AddComponent <AnimatedText>() as AnimatedText; dialogScreenAnimatedText.textToSpeech = sceneManager.GetComponent <TextToSpeech>(); dialogScreenAnimatedText.strings = new string[] { "Through the previous stages we have learnt exercises to strengthen our attachment to our inner-child.", "Using the bond you have developed with your child, these exercises can be used to calm your inner-child's emotional state when you experience trauma due to past events.", "For the first protocol, we need to imagine a traumatic experience from our past that has caused us to feel emotions associated with terror, helplessness, humiliation or rage.", "These negative emotions make your inner-child distressed... during these times our adult-self must quickly comfort and embrace the inner-child to make them happy again.", "Great, Your embrace has improved the emotional state of the inner-child.", "Now it is also important that we tell our inner-child with a loud voice supportive and reassuring phrases to help ease the pain of the traumatic experiences.", "Great! By continuing to rehearse this protocol you will be better able to self-regulate your emotions when you inner-child feels distressed", "Now we will move on to analyse a special image called the Gesalt vase which is a black vase that is associated with powerful dark and negative emotions.", "Look next to the inner-child at the Gesalt vase...", "However, the positive loving bond you have created with the inner-child using the previous protocols can be used to help overcome the negative emotions associated witht he vase. This can be done through singing your happy song for example.", "Excellent! Using the exercises learnt is a great way to relieve the stress caused by these dark emotions.", "Once this is achieved, we can disassociate the dark emotions from the image and start to see new possibilities...", "Look at the new red outline, you should be able to make out two white faces!", "These white faces represent our adult-self and inner-child looking at each other in a loving relationship", "We tend to see things from different perspectives depending on our emotions", "Finally, through performing these protocols to increase positive affects and contain the inner-child's negative thoughts and emotions...", "we start to realise these feelings stem from our negative past experiences e.g. toxic parental relationships.", "But as you continue to reduce these negative emotions, you and your inner-child can sense the growth in your emotional maturity and you no longer...", "have to see yourself as a scared prisoner of your past. You can now rely on your loving relationship with your inner-child to escape your struggles.", "Your cooperation with your inner child can be represented as a new and beautiful house with beautiful scenery...", "We can use the HoloLens to make this scenery a reality...", "Now look around your enhanced augmented environment!", "The chandelier has brighten up your room! The light and the beautiful new scenery is based on your new secure attachment with your inner child", "As your bond with your inner-child increases... think of this bright scenery to help remind you of your attachment." }; dialogScreenAnimatedText.enabled = true; child.SendMessage("DeactiveEmoScreen"); child.SendMessage("SetSadEmotion"); dialogScreen.SetActive(true); }
private AnimatedText GetAnimatedText(AnimatedText prefab, List <AnimatedText> pool) { if (pool == null) { pool = new List <AnimatedText>(); } if (pool.Count == 0) { return(CreateAnimatedText(prefab, pool)); } var existing = GetExistingAnimatedText(prefab, pool); if (existing == null) { return(CreateAnimatedText(prefab, pool)); } return(existing); }
public override void OnInspectorGUI() { EditorGUILayout.BeginVertical(); base.OnInspectorGUI(); AnimatedText myTarget = (AnimatedText)target; EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Trigger Impulse")) { myTarget.TriggerImpulse(); } if (GUILayout.Button("Regenerate")) { myTarget.Refresh(); } if (GUILayout.Button("Reinitialize")) { myTarget.Reinitialize(); } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); }
// Use this for initialization void Start() { ID = 0; text = (AnimatedText) gameObject.GetComponent("AnimatedText"); next = true; }