Esempio n. 1
0
    public void Graffiti()
    {
        if (!isGraffitied)
        {
            GraffitiButton.GetComponent <Image>().color = new Color32(0, 20, 255, 100);
            Graffitis += 1;
            GraffitiStat.GetComponent <Text>().text = StatToString(Graffitis);
            isGraffitied = true;
            PlayGraffiti();
            Spray.GetComponent <Text>().text = GraffitiGrammar.Generate();

            if (author == "You" && !Nest.GetComponent <Nest>().isTutorialGoing())
            {
                Nest.GetComponent <Nest>().LosePeeps();
                int response = Random.Range(0, 4);
                if (response == 0)
                {
                    SMBox.GetComponent <Nest>().PostTwit(Nest.GetComponent <Nest>().GenerateUsername(), "Graffiti on your own twit? You must be so lonely!");
                }
                else if (response == 1)
                {
                    SMBox.GetComponent <Nest>().PostTwit(Nest.GetComponent <Nest>().GenerateUsername(), "Hold up on the Graffiti, dude.");
                }
                else if (response == 2)
                {
                    SMBox.GetComponent <Nest>().PostTwit(Nest.GetComponent <Nest>().GenerateUsername(), "Okay, chill. Your own posts aren't that cool.");
                }
                else
                {
                    SMBox.GetComponent <Nest>().PostTwit(Nest.GetComponent <Nest>().GenerateUsername(), "We get it, you care about your own posts.");
                }
            }
            else if (Graffitis == 1)
            {
                if (Random.Range(0f, 1f) < 0.3f && !Nest.GetComponent <Nest>().isTutorialGoing())
                {
                    NB.AddPeep(author);
                    SpawnPeep();
                }
                else if (Random.Range(0f, 1f) < 0.7f && !Nest.GetComponent <Nest>().isTutorialGoing())
                {
                    NB.AddPeep(Nest.GetComponent <Nest>().GenerateUsername());
                    SpawnPeep();
                }
            }
            else if (Random.Range(0f, 1f) < Mathf.Min(0.5f, +0.0002f + popularity * 10 * NB.peeps * .0000001f))
            {
                if (NB.eggplants > 100 * NB.peeps && !Nest.GetComponent <Nest>().isTutorialGoing())
                {
                    NB.AddPeep(author);
                    SpawnPeep();
                }
            }
        }
        else
        {
            return;
        }
    }
Esempio n. 2
0
 string GenerateTwit()
 {
     if (TwitGrammar == null)
     {
         TwitGrammar = new TraceryGrammar(TwitGrammarFile.text);
     }
     return(TwitGrammar.Generate());
 }
Esempio n. 3
0
 public string GenerateUsername()
 {
     if (UsernameGrammar == null)
     {
         UsernameGrammar = new TraceryGrammar(UsernameGrammarFile.text);
     }
     if (Random.Range(0, 1f) < 0.7f)
     {
         return(UsernameGrammar.Generate());
     }
     else if (Random.Range(0, 1f) < 0.3f)
     {
         return(UsernameGrammar.Generate() + Random.Range(0, 10000).ToString());
     }
     else
     {
         return(UsernameGrammar.Generate() + Random.Range(0, 100).ToString());
     }
 }
Esempio n. 4
0
    void Awake()
    {
        grammar = new TraceryGrammar(traceryBioJson.text);
        string preloadString = grammar.Generate();

        preloadString = GetKillName();

        deathText.text = lastDeathMessage;
        instance       = this;
        playerT        = player.transform;
        if (!firstGame)
        {
            StartCoroutine(FadeToGame());
        }
        else
        {
            firstGame   = false;
            gameRunning = true;
        }
    }
Esempio n. 5
0
 private string GetBio()
 {
     return(grammar.Generate());
 }