// Use this for initialization void Start() { if (gameObject.active == false) { gameObject.SetActive(true); } if (gameObject.tag != "DialogManager") // seta a tag se ainda nao possuir { gameObject.tag = "DialogManager"; } canvasGroup = GetComponent <CanvasGroup>(); Hide(); // esconde o painel de dialogo textTyper = gameObject.GetComponent <TextTyper>(); Player = GameObject.FindGameObjectWithTag("Player"); // Passa as informações do player para o dialogo if (Player != null) { playerDialog.name = Player.GetComponent <DialogueBoxInfo>().characterName; playerDialog.characterIcon = Player.GetComponent <DialogueBoxInfo>().characterImg; playerDialog.textsArrays = Player.GetComponent <TextsArrays>(); } gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); }
// Use this for initialization void Start() { DialogueList = FindObjectOfType <DialogueDataBase>(); DialogueTemp = GameObject.FindGameObjectWithTag("Item Database").GetComponent <DialogueGenerator>(); QuestGenerate = GameObject.FindGameObjectWithTag("Item Database").GetComponent <QuestManager>(); Talk = FindObjectOfType <TextTyper>(); //find The chatBubble // need to create one if it doesnt exit /* * int t = 0; * foreach (Text child in TextContainer.transform) * { * Debug.Log(child); * ChatLine2[t] = child; * t++; * }*/ //ChatLine = GameObject.FindGameObjectsWithTag("ChatText"); //LineLength = ChatLine[0].GetComponent<Text>().text.Length; //ItemList = GameObject.FindGameObjectWithTag ("Item Database").GetComponent<ItemDatabase> (); //disableChatBubble(); TestString = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; }
// Use this for initialization void Start() { DialogueList = FindObjectOfType<DialogueDataBase>(); DialogueTemp = GameObject.FindGameObjectWithTag("Item Database").GetComponent<DialogueGenerator>(); QuestGenerate = GameObject.FindGameObjectWithTag("Item Database").GetComponent<QuestManager>(); Talk = FindObjectOfType<TextTyper>(); //find The chatBubble // need to create one if it doesnt exit /* int t = 0; foreach (Text child in TextContainer.transform) { Debug.Log(child); ChatLine2[t] = child; t++; }*/ //ChatLine = GameObject.FindGameObjectsWithTag("ChatText"); //LineLength = ChatLine[0].GetComponent<Text>().text.Length; //ItemList = GameObject.FindGameObjectWithTag ("Item Database").GetComponent<ItemDatabase> (); //disableChatBubble(); TestString = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; }
private void init() { GUI.backgroundColor = Color.blue; head = new SmallEducatorComposite(0, "Head", -1.0f); TextTyper textTyper = null; textFieldOne = GameObject.FindGameObjectWithTag("TextFieldOne").GetComponent <TextMeshProUGUI>(); textFieldTwo = GameObject.FindGameObjectWithTag("TextFieldTwo").GetComponent <TextMeshProUGUI>(); backgroundTextFieldOne = GameObject.FindGameObjectWithTag("BackgroundTextFieldOne").GetComponent <Image>(); backgroundTextFieldTwo = GameObject.FindGameObjectWithTag("BackgroundTextFieldTwo").GetComponent <Image>(); extraResourceButton = GameObject.FindGameObjectWithTag("ExtraResourceButton").GetComponent <Button>(); textTyper = setTextTyper(textFieldOne); textTyper = setTextTyper(textFieldTwo); lessons.Add(ApiConsumer.getLesson(0)); foreach (var lesson in lessons) { displayLesson(lesson); } /*/Video * ILeafBehaviour textBehaviour = new VideoBehaviour(videoPlayer, * "/Users/mjgth/Videos/Dm1hrYJX0AA8b5V.mp4" * , false, * //"https://video.twimg.com/tweet_video/DG8HO7UW0AAzsrL.mp4" * //, true, * new Vector2(0, 0), 1024, 1024, quad); * //VideoBehaviour(, new Vector2(0, 0), 400.0f, 400.0f); */ iterator = head.getIterator(); timer = 0.0f; done = false; }
// Use this for initialization void Start() { //int private vars timeElapsed = 0.0f; stage = 0; SBStextIndex = 0; BStextIndex = 0; //Get all needed compents Text = TextGameObject.GetComponent <GUIText>(); TextTyper = TextGameObject.GetComponent <TextTyper>(); TextBox = TextBoxGameObject.GetComponent <GUITexture>(); CharacterTalking = CharacterTalkingGameObject.GetComponent <GUITexture>(); CombatMenu = CombatMenuGameObject.GetComponent <GUITexture>(); PickUp = PickUpGameObject.GetComponent <PickupSpawner>(); PokemonMusic = PokemonMusicGameObject.GetComponent <AudioSource>(); XGonMusic = XGonMusicGameObject.GetComponent <AudioSource>(); //Turn off the text ui Text.enabled = false; TextBox.enabled = false; CharacterTalking.enabled = false; //init dialog SBSDialog[0] = "Ha! I have finally found you Mr. PotaTeo"; SBSDialog[1] = "I am Captain Indecisive-SlowTalker"; SBSDialog[2] = "And I have decided to take over this world "; SBSDialog[3] = "And for no reason at all"; SBSDialog[4] = "I have chosen you to be my mortal enemy"; SBSDialog[5] = "We will fight in turn based combat"; SBSDialog[6] = "To see what will happen to your planet!"; BSDialog[0] = "My turn!"; BSDialog[1] = "Hmmmm.... what should I do?"; BSDialog[2] = "I could do this move"; BSDialog[3] = "Or this one!"; BSDialog[4] = "Nah"; BSDialog[5] = "What about this!"; BSDialog[6] = "Ugh...... too many choices"; FSDialog[0] = "What are you doing?"; FSDialog[1] = "You can't move, it is my turn!"; FSDialog[2] = "NO STOP!"; FSDialog[3] = "Come on, that is not fair"; FSDialog[4] = "Seriously, that's cheating"; FSDialog[5] = "Staaaahpppppppppppp"; FSDialog[6] = "Come on, wait your turn"; //set gameobjects to be inactive BazookaGameObject.gameObject.SetActive(false); GunGameObject.gameObject.SetActive(false); //init public variables HasPickUpCrate = false; VillianDead = false; }
void Start() { // check if we have all the input we need if (AnalysisPanel == null || ThreatAssessmentPanel == null || InfoPanel == null) { return; } // get the speech manager textToSpeechManager = GetComponent <TextToSpeech>(); // set the 'typers' for the various output InfoPanelTyper = InfoPanel.GetComponent <TextTyper>(); AnalysisPanelTyper = AnalysisPanel.GetComponent <TextTyper>(); ThreatAssessmentPanelTyper = ThreatAssessmentPanel.GetComponent <TextTyper>(); DiagnosticsPanelTyper = DiagnosticPanel.GetComponent <TextTyper>(); // show initialization in the UI AnalysisPanelTyper.TypeText("ANALYSIS:\n**************\nInitializing"); ThreatAssessmentPanelTyper.TypeText("SCAN MODE XXXXX\nINITIALIZE"); InfoPanelTyper.TypeText("CONNECTING"); // Start the picture taking loop StartCoroutine(CoroLoop()); }
public TextBehaviour(TextTyper textTyper, List <string> linesOfText, Vector2 position) { this.textTyper = textTyper; this.position = position; this.linesOfText = linesOfText; }
void Start () { COMMANDS = new Dictionary<string[], Action> () { { new []{ "hey", "hello", "hi", "sup", "yo", "cooldog" }, SayHello }, { new []{ "who are you", "your name" }, Introduce }, { new []{ "batman" }, BecomeBatman }, { new []{ "email" }, OpenEmail }, { new []{ "note", "memo" }, TakeNotes }, { new []{ "remember", "remind" }, RememberThing }, { new []{ "trivia", "fact", "facts", "wiki" }, TellFact }, { new []{ "housekeeping", "poop", "pooping", "clean", "cleaning", "smell", "smelly" }, SuggestCleaning }, { new []{ "bye", "cya", "quit", "exit"}, Quit } }; inputField.onEndEdit.AddListener (val => { if (Input.GetKeyDown (KeyCode.Return) || Input.GetKeyDown (KeyCode.KeypadEnter)) { Parse (inputField.text.ToLower ()); inputField.text = ""; inputField.DeactivateInputField (); inputField.interactable = false; } }); cooldog = GameObject.Find ("Cooldog").GetComponent<Cooldog>(); typer = cooldog.GetComponent<TextTyper>(); Facts = new Facts (); }
// Use this for initialization public void StartDialog() { done = false; if (SceneManager.GetActiveScene().buildIndex != 4 && SceneManager.GetActiveScene().buildIndex != 5) { enemyAI = FindObjectOfType <EnemyAI>(); enemyAI.enabled = false; } Timer = FindObjectOfType <Timer>(); playerController = FindObjectOfType <PlayerController>(); waveSpawner = GetComponent <WaveSpawner>(); if (waveUI != null) { waveUI.SetActive(false); } textTyper = GetComponent <TextTyper>(); dialogBox.SetActive(true); if (sprite2 != null) { sprite2.gameObject.SetActive(false); } if (sprite1 != null) { sprite1.gameObject.SetActive(true); } playerController.enabled = false; StartingDialog(); }
void Awake() { interactableItems = GetComponent <InteractableItems>(); roomNavigation = GetComponent <RoomNavigation>(); _source = GetComponent <AudioSource>(); textTyper = FindObjectOfType <TextTyper>(); }
public NotePad(TextTyper typer) { this.typer = typer; screen = typer.Screen; position = new Position(); screenPosition = new Position(); }
// Use this for initialization void Awake() // Or awake? haven't had problems. { S = this; targetText = transform.GetChild(0).GetComponent <Text>(); // Only if you place this on my specific object setup of UI Image with child UI Text. this.GetComponent <Image>().CrossFadeAlpha(0, 0, true); targetText.CrossFadeAlpha(0, 0, true); }
void Start() { typer = text.GetComponent <TextTyper>(); typer.CharacterPrinted.AddListener(EmitSoundbite); typer.PrintCompleted.AddListener(() => { this.printCompleted = true; }); }
private void Start() { if (SceneManager.GetActiveScene().buildIndex == 1) { tutorialSkip = GetComponent <TutorialSkip>(); } textTyper = GetComponent <TextTyper>(); }
// Use this for initialization void Awake() // Or awake? haven't had problems. { S = this; targetText = transform.GetChild(0).GetComponent<Text>(); // Only if you place this on my specific object setup of UI Image with child UI Text. this.GetComponent<Image>().CrossFadeAlpha(0, 0, true); targetText.CrossFadeAlpha(0, 0, true); }
private TextTyper setTextTyper(TextMeshProUGUI textField) { TextTyper textTyper = textField.GetComponent <TextTyper>(); textTyper.TextField = textField; textTyper.TextSetting = new List <TextInit>(); textTyper.TextSetting.Add(textInit); return(textTyper); }
// Use this for initialization void Start() { th = GameObject.FindGameObjectWithTag("Tree").GetComponent <TreeHealth>(); gm = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); spawners = GameObject.FindGameObjectsWithTag("SoulSpawner"); textTyper = typerGameObject.GetComponent <TextTyper>(); nextWaveLabelText = nextWaveLabel.GetComponent <Text>(); nextWaveNumberText = nextWaveNumber.GetComponent <Text>(); }
void Start() { exeDirectory = new DirectoryInfo(Application.dataPath).Parent.FullName; poopTimer = PoopDelay * UnityEngine.Random.Range(0.8f, 1.2f); var texture = Resources.Load("Poop") as Texture2D; crunchedPoop = texture.EncodeToPNG(); audioSource = GetComponent<AudioSource>(); cooldog = GetComponent<Cooldog>(); textTyper = GetComponent<TextTyper>(); scratch = GetComponentInChildren<Scratch>(); }
void Start() { // set the 'typers' for the various output InfoPanelTyper = InfoPanel.GetComponent <TextTyper>(); AnalysisPanelTyper = AnalysisPanel.GetComponent <TextTyper>(); ThreatAssessmentPanelTyper = ThreatAssessmentPanel.GetComponent <TextTyper>(); DiagnosticsPanelTyper = DiagnosticPanel.GetComponent <TextTyper>(); InfoPanelTyper.TypeText("Connecting to Microsoft AZURE Service"); // Start the picture taking loop StartCoroutine(CoroLoop()); }
// Use this for initialization void Start() { DialogueList = FindObjectOfType <DialogueDataBase>(); DialogueTemp = GameObject.FindGameObjectWithTag("Item Database").GetComponent <DialogueGenerator>(); QuestGenerate = GameObject.FindGameObjectWithTag("Item Database").GetComponent <QuestManager>(); inventory = FindObjectOfType <Inventory>(); Talk = FindObjectOfType <TextTyper>(); TestString = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; }
private void Awake() { if (!instance) { instance = this; } else { Destroy(gameObject); } dialogTyper = dialogBox.GetComponent <TextTyper>(); StartStory(); }
private void init() { GUI.backgroundColor = Color.blue; head = new SmallEducatorComposite(0, "Head", -1.0f); TextTyper textTyper = null; textFieldOne = GameObject.FindGameObjectWithTag("TextFieldOne").GetComponent <TextMeshProUGUI>(); textFieldTwo = GameObject.FindGameObjectWithTag("TextFieldTwo").GetComponent <TextMeshProUGUI>(); backgroundTextFieldOne = GameObject.FindGameObjectWithTag("BackgroundTextFieldOne").GetComponent <Image>(); backgroundTextFieldTwo = GameObject.FindGameObjectWithTag("BackgroundTextFieldTwo").GetComponent <Image>(); extraResourceButton = GameObject.FindGameObjectWithTag("ExtraResourceButton").GetComponent <Button>(); textTyper = setTextTyper(textFieldOne); textTyper = setTextTyper(textFieldTwo); loadWeek2(); /*/Video * ILeafBehaviour textBehaviour = new VideoBehaviour(videoPlayer, * "/Users/mjgth/Videos/Dm1hrYJX0AA8b5V.mp4" * , false, * //"https://video.twimg.com/tweet_video/DG8HO7UW0AAzsrL.mp4" * //, true, * new Vector2(0, 0), 1024, 1024, quad); * //VideoBehaviour(, new Vector2(0, 0), 400.0f, 400.0f); */ /* * listOfLines.Clear(); * listOfLines.Add("hahaha ha hahahaha hahaha ha"); * listOfLines.Add("bla bla bla bla"); * listOfLines.Add("lalala lala lalalala lalala"); * * //Typed text * textBehaviour = new TextBehaviour(textTyper, listOfLines, new Vector2(-100, 100)); * addLeafWithText(head, 0.0f, 11.0f, textBehaviour); * * //ImageBehaviour(SmallEducator smallEducator, string url, GameObject quad, * //Vector2 position, Texture2D tex, float timer) * Texture2D tex = new Texture2D(680, 577, TextureFormat.DXT1, false); * textBehaviour = new ImageBehaviour(this, "https://www.uml-diagrams.org/class-diagrams/class-diagram-domain-overview.png", quad, new Vector2(0, 0), tex, 10.0f); * addLeafWithText(head, 0.0f, 11.0f, textBehaviour); */ iterator = head.getIterator(); timer = 0.0f; done = false; }
// Use this for initialization void Start() { controlMovement = FindObjectOfType <ControlMovement>(); ButtomRect = GetComponent <RectTransform>(); MinOrigin = ButtomRect.offsetMin; MaxOrigin = ButtomRect.offsetMax; //TargetPosition = new Vector2(transform.position.x, transform.position.y - TargetY); MinEnd = new Vector2(MinOrigin.x, MinOrigin.y - TargetY); MaxEnd = new Vector2(MaxOrigin.x, MaxOrigin.y - TargetY);; button = this.GetComponent <Button>(); buttonState = ButtonState.Attack; player = FindObjectOfType <Player>(); textTyper = FindObjectOfType <TextTyper>(); //Initail call of SwitchButton so we can attack at start buttonState = ButtonState.Attack; SwitchButton(); }
public TerminalConsole(DisplaySystem screen, Terminal terminal) { _terminal = terminal; _screen = screen; Typer = new TextTyper(screen, this); _runEventsTimer = new Timer(_outDeltaTime, RunEvents); _buffer = new CommandBuffer(10); _dynamicCode = new DynamicCode(this, screen); _clipTimer = new Timer(_startClipDelay, StartClip); _tick = _tickDelay; _fileController = new FileController(this); _fileController.UpdateDirsList(); _fileController.UpdateFileList(); _runner = new CommandRunner(Typer, _fileController, this); Writter = new ConsoleWriter(Typer); Invoker = new ActionInvoker(); _screen.BlackScreen(); _screen.Apply(); }
private void TextInputChanged(object obj) { if (obj as string is null or "") { _globalHook?.Dispose(); return; } Combination[] combinations = new Combination[((string)obj).Length]; int i = 0; foreach (char ch in (string)obj) { combinations[i] = Combination.TriggeredBy(TextTyper.ConvertCharToKey(ch)); i++; } Sequence sequence = Sequence.Of(combinations); _globalHook?.Dispose(); _globalHook = Hook.GlobalEvents(); _globalHook.OnSequence(new KeyValuePair <Sequence, Action>[] { new KeyValuePair <Sequence, Action>(sequence, ActivateTriggerOnKeyUp) }); }
public KeysController(TextTyper typer) { this.typer = typer; stickingStart = new Timer(startSticking, () => isSticking = true); sticking = new Timer(stickingDelay, () => typer.OnKeyDown('\b')); }
void Start() { Body = GameObject.Find("Body").GetComponent<DogPart>(); Face = GameObject.Find("Face").GetComponent<DogPart>(); Headdress = GameObject.Find("Headdress").GetComponent<DogPart>(); Arms = GameObject.Find("Arms").GetComponent<DogPart>(); Eyes = GameObject.Find("Eyes").GetComponent<DogPart>(); NeckDecoration = GameObject.Find("NeckDecoration").GetComponent<DogPart>(); Overlay = GameObject.Find("Overlay").GetComponent<DogPart>(); OtherOverlay = GameObject.Find("OtherOverlay").GetComponent<DogPart>(); PoopSack = GetComponent<PoopProduction>(); textTyper = GetComponent<TextTyper>(); toNextBlink = UnityEngine.Random.Range(1, 10); }
// Start is called before the first frame update void Start() { _textTyper = FindObjectOfType <TextTyper>(); _textTyper.TypeText(_bossDescription); _textTyper.OnTypingEnd += OnBossDescriptionTypeEnd; }
public void Start() { Cooldog = transform.parent.GetComponent<Cooldog>(); textTyper = transform.parent.GetComponent<TextTyper>(); }
// Use this for initialization void Start() { controlMovement = FindObjectOfType<ControlMovement>(); ButtomRect = GetComponent<RectTransform>(); MinOrigin = ButtomRect.offsetMin; MaxOrigin = ButtomRect.offsetMax; //TargetPosition = new Vector2(transform.position.x, transform.position.y - TargetY); MinEnd = new Vector2(MinOrigin.x, MinOrigin.y - TargetY); MaxEnd = new Vector2(MaxOrigin.x, MaxOrigin.y - TargetY);; button = this.GetComponent<Button>(); buttonState = ButtonState.Attack; player = FindObjectOfType<Player>(); textTyper = FindObjectOfType<TextTyper>(); //Initail call of SwitchButton so we can attack at start buttonState = ButtonState.Attack; SwitchButton(); }
public ConsoleWriter(TextTyper typer) { _typer = typer; }
public CommandRunner(TextTyper typer, FileController fileController, TerminalConsole console) { _console = console; _typer = typer; FileController = fileController; }
private void Start() { m_TextTyper = GameObject.FindObjectOfType <TextTyper>(); m_currentString = -1; DisplayNexMessage(); }