// Use this for initialization
 void Start()
 {
     player          = FindObjectOfType <Player> ();
     TopicChoice     = FindObjectOfType <TopicChoice> ();
     DialogueManager = FindObjectOfType <DialogueManager> ();
     Usable          = new List <string> ()
     {
         "MYDEATH"
     };
 }
 // Use this for initialization
 void Start()
 {
     player          = FindObjectOfType <Player> ();
     flashback       = GameObject.Find("Flashback");
     DialogueManager = FindObjectOfType <DialogueManager> ();
     TopicChoice     = FindObjectOfType <TopicChoice> ();
     Usable          = new List <string> ()
     {
         "GREET", "MYDEATH", "HOTEL", "SERVICE", "CHECKIN", "CHECKOUT", "PASSWORDS", "CHILDRENSHOW", "BREAKIN", "MANAGER", "CORNELIA", "TV", "PYGO", "MILAN", "RUSSET", "MEMORIAL"
     };
 }
Exemple #3
0
    void Start()
    {
        player          = FindObjectOfType <Player> ();
        DialogueManager = FindObjectOfType <DialogueManager> ();
//		Box = FindObjectOfType<AcquiredBox> ();
        TopicChoice = FindObjectOfType <TopicChoice> ();
        Usable      = new List <string> ()
        {
            "GREET"
        };
    }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     greetedAlready  = false;
     player          = FindObjectOfType <Player> ();
     DialogueManager = FindObjectOfType <DialogueManager> ();
     TopicChoice     = FindObjectOfType <TopicChoice> ();
     Usable          = new List <string> ()
     {
         "GREET", "MYDEATH", "HOTEL", "SERVICE", "CHECKIN", "CHECKOUT", "PASSWORDS", "CHILDRENSHOW", "BREAKIN", "MANAGER", "CORNELIA", "TV", "PYGO", "MILAN", "RUSSET"
     };
 }
Exemple #5
0
        static void Main(string[] args)
        {
            Random rnd = new Random();

            string[] alphabet = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };

            //Controls the first do/while loops
            bool start = true;

            //Stores the topic - genre choice
            int topicNum = 0;

            //Stores the topic chosen by the random generator
            string choiceTopic = string.Empty;

            //Stores the correct letters guessed by the user
            char[] word = new char[100];

            //Controls the win condition of the game
            bool win = false;

            //Controls the version of the hanging structure used to hang the man
            int hangIndex = 0;

            //Stores the letters inputed by the user
            string usedletters = string.Empty;

            topicNum    = TopicChoice.UserChoice();
            choiceTopic = TopicChoice.ChoiceTopic(topicNum, word);

            do
            {
                Console.Clear();
                Console.SetCursorPosition(0, 0);
                UpdateScreen.UpdateHang(hangIndex);
                UpdateScreen.ScreenUpdate(alphabet, word, usedletters);


                string letter = UpdateScreen.PlayerInput(alphabet, usedletters);

                usedletters = usedletters + letter;


                //Converts the letter inputed by the user into a char array
                char[] letterC = letter.ToCharArray();

                //Controls when the hangIndex is incremented
                bool error = true;

                //Stores how many correct letters the user guessed
                int wincounter = 0;


                for (int i = 0; i < choiceTopic.Length; i++)
                {
                    if (letterC[0] == choiceTopic[i])
                    {
                        word[i] = choiceTopic[i];

                        error = false;
                    }
                    if (word[i] == choiceTopic[i])
                    {
                        wincounter++;
                    }

                    if (wincounter == choiceTopic.Length)
                    {
                        win = true;
                    }
                }

                if (error)
                {
                    hangIndex++;
                }

                if (UpdateScreen.EndGame(win, choiceTopic, hangIndex))
                {
                    break;
                }
            } while (start);
        }
 void Start()
 {
     flavortexts = new Queue <string> ();
     dir         = new Queue <bool> ();
     topic       = FindObjectOfType <TopicChoice> ();
 }
 // Use this for initialization
 void Start()
 {
     TopicChoice = FindObjectOfType <TopicChoice>();
 }