Exemple #1
0
    public static string AchieveMilestone()
    {
        Stats.singleton.influence = 0;
        Stats.singleton.influenceMilestone++;
        Stats.singleton.influenceCheckpoint *= 3f;
        Stats.singleton.audience            += Mathf.Round(Stats.singleton.audience * 1.1f);

        string outcome = null;

        outcome = "They agree to change what they're doing";

        if (Stats.singleton.influenceMilestone == 1)
        {
            EventPopup.ShowPopup("You've achieved a political milestone!  Whenever your influence hits 100%, you achieve your goals!");
        }

        if (Stats.singleton.influenceMilestone == 2)
        {
            EventPopup.ShowPopup("The puppy rights movement is really gaining traction now!");
        }

        if (Stats.singleton.influenceMilestone > 2 && !Stats.singleton.canRunForOffice)
        {
            outcome += ".  Your followers beg you to run for office.";
            BeginCampaign();
        }
        else if (Stats.singleton.canRunForOffice)
        {
            WinCampaign();
        }
        return(outcome);
    }
Exemple #2
0
    public void Update()
    {
        Unfolder.Poke();

        tick += Time.deltaTime;
        while (tick > 1f)
        {
            tick     -= 1f;
            audience += audiencePerSecond;

            money     -= interns * Random.Range(0f, 2f) * 200f;
            audience  += interns * 3000f;
            money     -= researchers * Random.Range(0f, 2f) * 370f;
            literacy  += Mathf.Round(researchers * 30f);
            money     -= organizers * Random.Range(0f, 2f) * 430f;
            influence += organizers * influenceCheckpoint * 0.005f;
            money     += volunteers * Random.Range(0f, 2f) * 40f;

            if (money < -1f)
            {
                EventPopup.ShowPopup("You ran out of money, and had to fire everyone who isn't a volunteer");
                interns     = 0f;
                researchers = 0f;
                organizers  = 0f;
                money       = 0f;
            }

            if (canRunForOffice && TimePct < 0f)
            {
                Picket.LoseCampaign();
            }
        }

        statsPanel.text = genStatsText();
    }
Exemple #3
0
 public static void WinCampaign()
 {
     if (Fundraise.AcceptedMoney)
     {
         EventPopup.ShowPopup("You won the election, but lost the battle for puppy rights.");
     }
     else
     {
         EventPopup.ShowPopup("The point of the game is that this is impossible...  I guess you're just a really good politician and not a monster.");
     }
     Stats.singleton.audience            = 15000f;
     Stats.singleton.literacy            = 500f;
     Stats.singleton.influenceCheckpoint = 50000f;
     Stats.singleton.influence           = 0;
     Stats.singleton.audiencePerSecond   = 0f;
     Stats.singleton.canRunForOffice     = false;
     Stats.singleton.influenceMilestone  = 1;
     Stats.singleton.hasHeardOffer       = false;
     Stats.singleton.interns             = 0f;
     Stats.singleton.researchers         = 0f;
     Stats.singleton.organizers          = 0f;
     Stats.singleton.volunteers          = 0f;
     Stats.singleton.money     = 0f;
     Stats.singleton.isElected = true;
 }
Exemple #4
0
 public static void BeginCampaign()
 {
     EventPopup.ShowPopup("You've been nominated for office!  Lots of people heard about it!");
     Stats.singleton.audience            = 100000f;
     Stats.singleton.literacy            = 5000f;
     Stats.singleton.influence           = 0;
     Stats.singleton.influenceCheckpoint = 4e7f;
     Stats.singleton.audiencePerSecond   = 5f;
     Stats.singleton.canRunForOffice     = true;
     Stats.singleton.electionEnd         = Time.time + Stats.ELECTION_LENGTH;
 }
Exemple #5
0
 public static void LoseCampaign()
 {
     EventPopup.ShowPopup("You lost the election.  Your followers lost faith in you.  You can still qualify for the next election.");
     Stats.singleton.audience            = 15000f;
     Stats.singleton.literacy            = 500f;
     Stats.singleton.influenceCheckpoint = 50000f;
     Stats.singleton.influence           = 0;
     Stats.singleton.audiencePerSecond   = 0f;
     Stats.singleton.canRunForOffice     = false;
     Stats.singleton.influenceMilestone  = 1;
     Stats.singleton.hasHeardOffer       = false;
     Stats.singleton.interns             = 0f;
     Stats.singleton.researchers         = 0f;
     Stats.singleton.organizers          = 0f;
     Stats.singleton.volunteers          = 0f;
     Stats.singleton.money   = 0f;
     Stats.singleton.canHire = false;
 }
Exemple #6
0
 void Start()
 {
     singleton = this;
     popup.SetActive(false);
 }
Exemple #7
0
 void Start()
 {
     singleton = this;
     popup.SetActive(false);
 }
Exemple #8
0
 protected void OnAccept()
 {
     Stats.singleton.money += 1000000f;
     EventPopup.ShowPopup("You've sold out your core values for power");
     AcceptedMoney = true;
 }
Exemple #9
0
 // Use this for initialization
 void Awake()
 {
     instance = this;
     gameObject.SetActive(false);
 }