Beispiel #1
0
    public void No()
    {
        TweetController tc;

        if (TweetController.TryGetManager(out tc))
        {
            tc.NoButton();
        }
    }
Beispiel #2
0
    public void Yes()
    {
        TweetController tc;

        if (TweetController.TryGetManager(out tc))
        {
            tc.YesButton();
        }
    }
Beispiel #3
0
    /// <summary>
    /// Starts events associated with the secondary event clock and frequency
    /// </summary>
    private void StartSecondaryEvent()
    {
        //Start Events
        if (timeSinceLastSecondaryEvent > altEventFrequency)
        {
            timeSinceLastSecondaryEvent = 0;
            //Currently, there's a 40% chance of dialogue, 40% chance of tweets, and 20% chance of the nuke button
            int randInt = Random.Range(0, 5);
            if ((randInt >= 0 && randInt <= 2) && !buttonEventActive)
            {
                ButtonController bc;
                if (ButtonController.TryGetManager(out bc))
                {
                    bc.StartEvent();
                    buttonEventActive = true;
                }
            }
            else if ((randInt == 3) && !dialogueEventActive)
            {
                DialogueController dc;
                if (DialogueController.TryGetManager(out dc))
                {
                    dc.StartEvent();
                    dialogueEventActive = true;
                }
            }
            else if (!tweetEventActive)
            {
                TweetController tc;
                if (TweetController.TryGetManager(out tc))
                {
                    tc.StartEvent();
                    tweetEventActive = true;
                }
            }


            //Debug.Log("SPAWNING SECONDARY EVENT");
        }
    }
Beispiel #4
0
 /// <summary>
 /// Starts events associated with the primary event clock and frequency
 /// </summary>
 private void StartPrimaryEvent()
 {
     //Start Events
     if (timeSinceLastEvent > eventFrequency)
     {
         timeSinceLastEvent = 0;
         int randInt = Random.Range(0, 5);
         if ((randInt >= 0 && randInt <= 1) && !dialogueEventActive)
         {
             DialogueController dc;
             if (DialogueController.TryGetManager(out dc))
             {
                 dc.StartEvent();
                 dialogueEventActive = true;
             }
         }
         else if ((randInt >= 2 && randInt <= 3) && !tweetEventActive)
         {
             TweetController tc;
             if (TweetController.TryGetManager(out tc))
             {
                 tc.StartEvent();
                 tweetEventActive = true;
             }
         }
         else if (!buttonEventActive)
         {
             ButtonController bc;
             if (ButtonController.TryGetManager(out bc))
             {
                 bc.StartEvent();
                 buttonEventActive = true;
             }
         }
     }
 }