示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        startingMessages = new StartingMessage();
        currentGui       = new ConversationGUI(new Conversation(startingMessages.GetOne()));
        conversations.Add(currentGui);

        StartCoroutine(Complaint());
    }
示例#2
0
    private void OnGUI()
    {
        gui.Draw();

        using (new GUILayout.HorizontalScope())
        {
            using (new GUILayout.VerticalScope())
            {
                using (new GUILayout.HorizontalScope())
                {
                    if (GUILayout.Button("Quit Job"))
                    {
                        Application.Quit();
                    }
                    int counter = 1;
                    foreach (var conversation in conversations)
                    {
                        if (GUILayout.Button($"Call {counter}", GUILayout.Width(70)))
                        {
                            currentGui = conversation;
                        }
                        counter++;
                    }
                }

                currentGui?.Draw();
            }
            using (new GUILayout.VerticalScope())
            {
                GUILayout.Label(companyPolicy);
                if (GUILayout.Button("Help"))
                {
                    salary -= 25;
                    StartCoroutine(RequestHelp());
                }
                GUILayout.Label(helpStatus);
                GUILayout.Label("Job Performance:");
                foreach (var complaint in complaints)
                {
                    GUILayout.Label(complaint);
                }
            }
            using (new GUILayout.HorizontalScope())
            {
                GUILayout.Label("Salary: $" + salary);
            }
        }
    }