Example #1
0
        public override string GetNextLine()
        {
            string line = null;

            if (GlobalState.instance.ostrichGameComplete)
            {
                switch (state)
                {
                case OstrichState.CLOSE:
                    state = OstrichState.AFTER_MG_IDLE;
                    line  = null;
                    break;

                default:
                    state = OstrichState.CLOSE;
                    line  = "Owww, my aching everything... Don't forget to hide with B if you ever see the Sarge again!";
                    break;
                }
            }
            else
            {
                switch (state)
                {
                case OstrichState.IDLE:
                    state = OstrichState.DIALOG_1;
                    AudioSource.PlayClipAtPoint(clip, new Vector3(0, 0, 0));
                    line = "Shh! Get down and hide, or the sergeant will find us!";
                    break;

                case OstrichState.DIALOG_1:
                    state = OstrichState.DIALOG_2;
                    line  = "What are you doing slacking off, soldiers? GET BACK TO TRAINING!";
                    break;

                case OstrichState.DIALOG_2:
                    state = OstrichState.DIALOG_3;
                    line  = "Ahh! He found us!";
                    break;

                case OstrichState.DIALOG_3:
                    state = OstrichState.DIALOG_END;
                    line  = "Everyone, get on the track and RUN! That means you, blubberbrains!";
                    break;

                case OstrichState.DIALOG_END:
                    state = OstrichState.DIALOG_DONE;
                    line  = null;
                    SceneManager.LoadScene("Ostrich_Game");
                    break;
                }
            }

            return(line);
        }
Example #2
0
 // Use this for initialization
 void Start()
 {
     state = OstrichState.IDLE;
 }