// Update is called once per frame void Update() { if (initialDelay <= 0 && Random.Range(0, 1000000) < 1) { PostTwit("Teh Twit Birb (TM)", tutorialTips[Random.Range(0, tutorialTips.Length)]); } if (initialDelay > 0) { initialDelay -= Time.deltaTime; if (initialDelay <= 0 && !isSM && !tested) { ScratchBox.GetComponent <InputField>().interactable = true; Placeholder.SetActive(true); PostTwit("You", "Just joined Twit Idol! #twit #idol #beginner", -1, 0, 0, 0); initialDelay = 25f; tested = true; } return; } timeSinceLastTwit += Time.deltaTime; if (isSM && timeSinceLastTwit > Random.Range(0f, Mathf.Max(1, 1000000 - 3 * NB.GetComponent <NumbersBoard>().peeps))) { LosePeeps(); if (isSM && NB.GetComponent <NumbersBoard>().peeps > 3 && !isTutorialGoing() && Random.Range(0f, 1f) < 0.3f) { PostTwit(GenerateUsername(), TwitGrammar.Parse("#notwit#")); LosePeeps(); } else if (isSM && timeSinceLastTwit > 30 && NB.GetComponent <NumbersBoard>().peeps > 5) { string twit = "Sheesh, you haven't posted in " + timeSinceLastTwit.ToString("F1") + " seconds, what's the deal?"; PostTwit(GenerateUsername(), twit); LosePeeps(); } } if (!isSM && timeTilNextUserPost < 0) { GenerateUserPost(); if (twitIntensity < 0.2f) { twitIntensity = 3f; } else if (twitIntensity > 15) { twitIntensity -= 10; } timeTilNextUserPost = Mathf.Pow(Random.Range(0.2f, twitIntensity), 1.4f); twitIntensity += Random.Range(-1f, 1f); } else { timeTilNextUserPost -= Time.deltaTime; } }
public void GenerateOutput() { string output = grammar.Parse("#origin#"); output.Replace("<br>", "\\n"); TextOutput.text = output; GameManager.instance.ParseKey(TextOutput.text); }
public void GenerateOutput() { var output = Grammar.Parse(TokenInput.text); TextOutput.text = output; }
public void GenerateOutput() { var output = Grammar.Parse("#origin#"); TextOutput.text = output; }