Esempio n. 1
0
    public void StartInvasionTutorial()
    {
        ShowEnemyInvasionTut();
        ConversationInformationData tmp = DialogueManager.GetInstance.dialogueStorage.ObtainConversationByTitle("Prologue - Engage Enemy");

        DialogueManager.GetInstance.StartConversation(tmp, HideInvasionTutorial);
    }
Esempio n. 2
0
        public void ShowEndWeekPrologue()
        {
            ResourceInformationController.GetInstance.overheadTutorialController.ShowWeekTutorial();

            ConversationInformationData tmp = DialogueManager.GetInstance.dialogueStorage.ObtainConversationByTitle("Prologue - Week End Guide");

            DialogueManager.GetInstance.StartConversation(tmp, ResourceInformationController.GetInstance.overheadTutorialController.HideAllTutorial);
        }
Esempio n. 3
0
    public void StartUpgradeTutorial(bool fromCreationScene)
    {
        if (BalconySceneManager.GetInstance == null)
        {
            return;
        }

        List <DialogueIndexReaction> callBacks = new List <DialogueIndexReaction>();



        if (DialogueManager.GetInstance != null)
        {
            ConversationInformationData tmp = DialogueManager.GetInstance.dialogueStorage.ObtainConversationByTitle("Prologue - Upgrades");

            if (fromCreationScene)
            {
                Debug.Log("Starting Upgrade Tutorial");
                DialogueIndexReaction temp1 = new DialogueIndexReaction();
                temp1.dialogueIndex     = 8;
                temp1.potentialCallback = () => ShowEnemyInvasionTut();

                DialogueIndexReaction temp2 = new DialogueIndexReaction();
                temp2.dialogueIndex     = 10;
                temp2.potentialCallback = () => ShowBarracksInvasionTut();

                callBacks.Add(temp1);
                callBacks.Add(temp2);
            }
            else
            {
                DialogueIndexReaction temp1 = new DialogueIndexReaction();
                temp1.dialogueIndex     = 7;
                temp1.potentialCallback = () => SkipInvasionDialogue();

                DialogueIndexReaction temp2 = new DialogueIndexReaction();
                temp2.dialogueIndex     = 10;
                temp2.potentialCallback = () => ShowBarracksInvasionTut();

                callBacks.Add(temp1);
                callBacks.Add(temp2);
                // Optional : You might be able to use this part in case you want to 're-run' the tutorial
                // post-creation
            }
            DialogueManager.GetInstance.StartConversation(tmp, HideUpgradesTutorial, callBacks);
        }
    }
Esempio n. 4
0
        public void EndPrologueEvents(Action endDialogueProceeding = null)
        {
            if (DialogueManager.GetInstance == null)
            {
                return;
            }

            if (DramaticActManager.GetInstance == null)
            {
                return;
            }

            EventBroadcaster.Instance.PostEvent(EventNames.HIDE_RESOURCES);
            ConversationInformationData tmp = DialogueManager.GetInstance.dialogueStorage.ObtainConversationByTitle("Prologue - Before the Week has passed.");

            DramaticActManager.GetInstance.FadeToDark(true, () => DialogueManager.GetInstance.StartConversation(tmp, endDialogueProceeding));
        }
Esempio n. 5
0
        public void StartOverheadTutorial(bool fromCreationScene = false)
        {
            List <DialogueIndexReaction> callBacks = new List <DialogueIndexReaction>();

            DialogueIndexReaction temp1 = new DialogueIndexReaction();

            temp1.dialogueIndex     = 0;
            temp1.potentialCallback = () => overheadTutorialController.ShowFoodTutorial();

            DialogueIndexReaction temp2 = new DialogueIndexReaction();

            temp2.dialogueIndex     = 3;
            temp2.potentialCallback = () => overheadTutorialController.ShowTroopTutorial();

            DialogueIndexReaction temp3 = new DialogueIndexReaction();

            temp3.dialogueIndex     = 4;
            temp3.potentialCallback = () => overheadTutorialController.ShowCoinTutorial();

            DialogueIndexReaction temp4 = new DialogueIndexReaction();

            temp4.dialogueIndex     = 2;
            temp4.potentialCallback = () => overheadTutorialController.ShowPopulationTutorial();

            callBacks.Add(temp1);
            callBacks.Add(temp2);
            callBacks.Add(temp3);
            callBacks.Add(temp4);

            if (DialogueManager.GetInstance != null)
            {
                ConversationInformationData tmp = DialogueManager.GetInstance.dialogueStorage.ObtainConversationByTitle("Introduce The Resources");

                if (fromCreationScene)
                {
                }
                else
                {
                }
                ShowResourcePanel(ResourcePanelType.overhead, () => DialogueManager.GetInstance.StartConversation(tmp, PrologueScene, callBacks));
            }
        }
Esempio n. 6
0
    public void PlayPrologueResultScene()
    {
        if (playerWon)
        {
            BattlefieldSpawnManager.GetInstance.HideAllUnitsHealthBar();
            BattlefieldUIHandler uiHandler = BattlefieldSceneManager.GetInstance.battleUIInformation;
            uiHandler.attackerPanel.skillSlotHandler.myPanel.PlayCloseAnimation();
            uiHandler.defenderPanel.skillSlotHandler.myPanel.PlayCloseAnimation();

            uiHandler.attackerPanel.leaderSlotHandler.myPanel.PlayCloseAnimation();
            uiHandler.defenderPanel.leaderSlotHandler.myPanel.PlayCloseAnimation();

            uiHandler.myPanel.PlayCloseAnimation();
            ConversationInformationData tmp = DialogueManager.GetInstance.dialogueStorage.ObtainConversationByTitle("Prologue - Making Peace");
            Drama.DramaticActManager.GetInstance.FadeToDark(true, () => DialogueManager.GetInstance.StartConversation(tmp, () => TransitionManager.GetInstance.LoadScene(SceneType.Courtroom)));
        }
        else
        {
            TransitionManager.GetInstance.LoadScene(SceneType.Battlefield);
        }
    }
Esempio n. 7
0
    public void StartBalconyTutorial(bool fromCreationScene)
    {
        List <DialogueIndexReaction> callBacks = new List <DialogueIndexReaction>();

        DialogueIndexReaction temp0 = new DialogueIndexReaction();

        temp0.dialogueIndex     = 1;
        temp0.potentialCallback = () => DialogueManager.GetInstance.MovePanelUp();

        DialogueIndexReaction temp1 = new DialogueIndexReaction();

        temp1.dialogueIndex     = 2;
        temp1.potentialCallback = () => ShowBarracksTutorial();

        DialogueIndexReaction temp2 = new DialogueIndexReaction();

        temp2.dialogueIndex     = 5;
        temp2.potentialCallback = () => ShowFarmTutorial();

        DialogueIndexReaction temp3 = new DialogueIndexReaction();

        temp3.dialogueIndex     = 9;
        temp3.potentialCallback = () => ShowTavernTutorial();
        temp3.moveDialogueUp    = true;

        DialogueIndexReaction temp4 = new DialogueIndexReaction();

        temp4.dialogueIndex     = 13;
        temp4.potentialCallback = () => ShowShopTutorial();

        DialogueIndexReaction temp5 = new DialogueIndexReaction();

        temp5.dialogueIndex     = 17;
        temp5.potentialCallback = () => ShowBlacksmithTutorial();

        DialogueIndexReaction temp6 = new DialogueIndexReaction();

        temp6.dialogueIndex     = 20;
        temp6.potentialCallback = () => ShowTravelTutorial();
        temp6.moveDialogueDown  = true;

        DialogueIndexReaction temp7 = new DialogueIndexReaction();

        temp7.dialogueIndex     = 23;
        temp7.potentialCallback = () => ShowHousingTutorial();

        DialogueIndexReaction temp8 = new DialogueIndexReaction();

        temp8.dialogueIndex     = 27;
        temp8.potentialCallback = () => ShowMarketTutorial();
        temp8.moveDialogueUp    = true;


        callBacks.Add(temp0);
        callBacks.Add(temp1);
        callBacks.Add(temp2);
        callBacks.Add(temp3);
        callBacks.Add(temp4);
        callBacks.Add(temp5);
        callBacks.Add(temp6);
        callBacks.Add(temp7);
        callBacks.Add(temp8);

        if (TransitionManager.GetInstance != null)
        {
            TransitionManager.GetInstance.HideTabCover();
        }

        if (DialogueManager.GetInstance != null)
        {
            if (fromCreationScene)
            {
                // Summon Monster
                BalconySceneManager.GetInstance.travelSystem.SummonRandomTraveller(TravelLocation.ForestOfRetsnom, TravellerType.Invader, 20); // 20
                prologueBandit = BalconySceneManager.GetInstance.travelSystem.spawnedUnits[BalconySceneManager.GetInstance.travelSystem.spawnedUnits.Count - 1];
                prologueBandit.clickDetector.isClickable = false;
            }
            else
            {
                // Optional : You might be able to use this part in case you want to 're-run' the tutorial
                // post-creation
            }

            ConversationInformationData tmp = DialogueManager.GetInstance.dialogueStorage.ObtainConversationByTitle("Introduce the buildings");
            Debug.Log("[STARTING CONVERSATION] Introduce the buildings");
            DialogueManager.GetInstance.StartConversation(tmp, HideAllTutorial, callBacks);
        }
    }
Esempio n. 8
0
        public void EnactAction(DramaAction thisAction)
        {
            if (thisAction.delayBeforeStart > 0.0f)
            {
                float time = new float();
                time = thisAction.delayBeforeStart;
                thisAction.delayBeforeStart = 0;
                StartCoroutine(DelayThisAction(thisAction, time));
            }
            else
            {
                // Check if Actor Exist
                if (thisAction.actionType == DramaActionType.MakeActorMove)
                {
                    if (thisAction.thisActor.actorType != DramaActorType.SFX && thisAction.thisActor.actorType != DramaActorType.Tools)
                    {
                        //Debug.Log("Making Actor Move!");
                        GameObject actionActor = thisAction.thisActor.currentActor;

                        if (actionActor.GetComponent <BaseCharacter>() == null)
                        {
                            return;
                        }

                        BaseCharacter thisChar = actionActor.GetComponent <BaseCharacter>();
                        if (thisAction.stayOnLastState)
                        {
                            thisChar.isActing = true;
                        }
                        else
                        {
                            thisChar.isActing = false;
                        }

                        if (thisChar == null)
                        {
                            // Debug.LogError("BaseCharacter Not Found, Check Unit");
                            return;
                        }

                        if (ScenePointPathfinder.GetInstance == null)
                        {
                            //  Debug.LogError("Need ScenePoint PathFinder");
                            return;
                        }

                        if (thisAction.actorPositionIdx == 0)
                        {
                            ScenePointBehavior tmp = ScenePointPathfinder.GetInstance.ObtainNearestScenePoint(thisAction.actorsPosition[0]);
                            thisChar.SpawnInThisPosition(tmp);
                            CheckNextMove(thisChar, thisAction);
                            thisChar.OrderToFace((FacingDirection)thisAction.facingDirection[thisAction.actorPositionIdx]);
                        }
                        else
                        {
                            ScenePointBehavior tmp = ScenePointPathfinder.GetInstance.ObtainNearestScenePoint(thisAction.actorsPosition[1]);
                            thisChar.OrderMovement(tmp, () => CheckNextMove(thisChar, thisAction));
                            thisChar.OrderToFace((FacingDirection)thisAction.facingDirection[thisAction.actorPositionIdx]);
                        }
                    }
                    else if (thisAction.thisActor.actorType == DramaActorType.Tools)
                    {
                        BaseToolBehavior tmp = thisAction.thisActor.currentActor.GetComponent <BaseToolBehavior>();

                        if (tmp == null)
                        {
                            return;
                        }

                        if (thisAction.actorPositionIdx == 0)
                        {
                            tmp.OrderMovement(thisAction.actorsPosition[0], () => CheckNextMove(tmp, thisAction));
                        }
                    }
                }
                else if (thisAction.actionType == DramaActionType.BanishActor)
                {
                    GameObject actionActor = thisAction.thisActor.currentActor;

                    if (actionActor.GetComponent <BaseCharacter>() == null)
                    {
                        return;
                    }

                    BaseCharacter thisChar = actionActor.GetComponent <BaseCharacter>();

                    thisChar.OrderToBanish();
                    CheckNextMove(thisAction);
                }
                else if (thisAction.actionType == DramaActionType.ShowActor)
                {
                    GameObject actionActor = thisAction.thisActor.currentActor;

                    if (actionActor.GetComponent <BaseCharacter>() == null)
                    {
                        return;
                    }

                    BaseCharacter thisChar = actionActor.GetComponent <BaseCharacter>();

                    thisChar.OrderToReveal();
                    CheckNextMove(thisAction);
                }
                else if (thisAction.actionType == DramaActionType.ShowConversation)
                {
                    if (DialogueManager.GetInstance == null)
                    {
                        return;
                    }

                    ConversationInformationData thisConversation = DialogueManager.GetInstance.dialogueStorage.ObtainConversationByTitle(thisAction.conversationTitle);
                    thisConversation.conversingActors = new List <BaseCharacter>();

                    DialogueManager.GetInstance.StartConversation(thisConversation, () => CheckNextMove(thisAction));
                }
                else if (thisAction.actionType == DramaActionType.ShowTabCover)
                {
                    if (TransitionManager.GetInstance == null)
                    {
                        return;
                    }

                    TransitionManager.GetInstance.ShowTabCover();
                }
                else if (thisAction.actionType == DramaActionType.HideTabCover)
                {
                    if (TransitionManager.GetInstance == null)
                    {
                        return;
                    }

                    TransitionManager.GetInstance.HideTabCover();
                }
                else if (thisAction.actionType == DramaActionType.FadeToDark)
                {
                    darkFader.FadeToDark(() => CheckNextMove(thisAction));
                }
                else if (thisAction.actionType == DramaActionType.FadeToClear)
                {
                    darkFader.FadeToClear(() => CheckNextMove(thisAction));
                }
                else if (thisAction.actionType == DramaActionType.LoadThisScene)
                {
                    if (TransitionManager.GetInstance == null)
                    {
                        return;
                    }

                    DialogueManager.GetInstance.afterConversationCallBack.Clear();

                    TransitionManager.GetInstance.LoadScene(thisAction.loadThisScene, ClearDrama);
                }
            }
        }
Esempio n. 9
0
    public void StartBattlefieldTutorial(bool fromCreationScene)
    {
        List <DialogueIndexReaction> callBacks = new List <DialogueIndexReaction>();

        DialogueIndexReaction temp0 = new DialogueIndexReaction();

        temp0.dialogueIndex     = 1;
        temp0.potentialCallback = () => DialogueManager.GetInstance.MovePanelUp();

        DialogueIndexReaction temp1 = new DialogueIndexReaction();

        temp1.dialogueIndex     = 4;
        temp1.potentialCallback = () => DialogueManager.GetInstance.MovePanelDown();

        DialogueIndexReaction temp2 = new DialogueIndexReaction();

        temp2.dialogueIndex     = 5;
        temp2.potentialCallback = () => ShowVictorySliderTutorial();

        DialogueIndexReaction temp3 = new DialogueIndexReaction();

        temp3.dialogueIndex     = 8;
        temp3.potentialCallback = () => ShowWarChestTutorial();

        DialogueIndexReaction temp4 = new DialogueIndexReaction();

        temp4.dialogueIndex     = 11;
        temp4.potentialCallback = () => DialogueManager.GetInstance.MovePanelUp();

        DialogueIndexReaction temp5 = new DialogueIndexReaction();

        temp5.dialogueIndex     = 12;
        temp5.potentialCallback = () => ShowSkillsTutorial();

        DialogueIndexReaction temp6 = new DialogueIndexReaction();

        temp6.dialogueIndex     = 14;
        temp6.potentialCallback = () => DialogueManager.GetInstance.MovePanelDown();

        DialogueIndexReaction temp7 = new DialogueIndexReaction();

        temp7.dialogueIndex     = 15;
        temp7.potentialCallback = () => ShowSummonSpawnTutorial();


        callBacks.Add(temp0); callBacks.Add(temp1); callBacks.Add(temp2); callBacks.Add(temp3);
        callBacks.Add(temp4); callBacks.Add(temp5); callBacks.Add(temp6); callBacks.Add(temp7);


        if (TransitionManager.GetInstance != null)
        {
            TransitionManager.GetInstance.HideTabCover();
        }

        if (DialogueManager.GetInstance != null)
        {
            if (fromCreationScene)
            {
                // Pause Everything First.
            }
            else
            {
                // Optional : You might be able to use this part in case you want to 're-run' the tutorial
                // post-creation
            }

            ConversationInformationData tmp = DialogueManager.GetInstance.dialogueStorage.ObtainConversationByTitle("Remember the Battlefield");
            Debug.Log("[STARTING CONVERSATION] Remembering the Battlefield");
            DialogueManager.GetInstance.StartConversation(tmp, HideAllTutorial, callBacks);
        }
    }
    public ConversationInformationData ObtainConversationByTitle(string thisTitle)
    {
        ConversationInformationData thisConversation = conversationList.Find(x => x.conversationTitle == thisTitle);

        return(thisConversation);
    }
    public void ShowCurrentConversation()
    {
        bool SaveStorage = false;

        if (curConversation == null)
        {
            curConversation = new ConversationInformationData();
        }
        GUILayout.BeginArea(new Rect(5, 12, leftPanelWidth, 300));

        // Conversation Title
        GUILayout.BeginHorizontal();
        EditorGUIUtility.labelWidth = 34;
        EditorGUILayout.LabelField("Title:", EditorStyles.boldLabel, GUILayout.Width(75));
        curConversation.conversationTitle = EditorGUILayout.TextField(curConversation.conversationTitle, GUILayout.MaxWidth(300));
        int maxIdx = (curConversation.dialoguePattern != null && curConversation.dialoguePattern.Count > 0) ? curConversation.dialoguePattern.Count : 0;

        EditorGUILayout.LabelField("Index:" + selectedPatternIdx + "/" + maxIdx, GUILayout.MaxWidth(100));
        GUILayout.EndHorizontal();
        GUILayout.EndArea();

        GUILayout.BeginArea(new Rect(5, 32, 150, 300));
        GUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Characters:", EditorStyles.boldLabel, GUILayout.Width(75));
        if (curConversation.characterNames != null && selectedCharacterNameIdx < curConversation.characterNames.Count)
        {
            EditorGUI.BeginChangeCheck();
            string tmp = curConversation.characterNames[selectedCharacterNameIdx];
            tmp = EditorGUILayout.TextField(curConversation.characterNames[selectedCharacterNameIdx], GUILayout.MaxWidth(120));

            if (EditorGUI.EndChangeCheck())
            {
                if (tmp != curConversation.characterNames[selectedCharacterNameIdx])
                {
                    UpdateNamesOnPatterns(tmp);
                    curConversation.characterNames[selectedCharacterNameIdx] = tmp;
                }
            }
        }
        GUILayout.EndHorizontal();

        characterListScrollPos = GUILayout.BeginScrollView(characterListScrollPos, new GUIStyle("RL Background"), GUILayout.Width(300), GUILayout.Height(position.height - 400));
        if (curConversation.characterNames != null && curConversation.characterNames.Count > 0)
        {
            int removedNames = -1;
            for (int i = 0; i < curConversation.characterNames.Count; i++)
            {
                bool isClicked = false;
                bool isRemoved = false;
                GUILayout.BeginHorizontal();
                isClicked = GUILayout.Button(curConversation.characterNames[i], (selectedCharacterNameIdx == i) ? selectedText : notSelectedText, GUILayout.MinWidth(90));
                isRemoved = GUILayout.Button("-", GUILayout.MaxWidth(50));
                GUILayout.EndHorizontal();

                if (isClicked)
                {
                    selectedCharacterNameIdx = i;
                    GUI.FocusControl(null);
                    isClicked = false;
                }

                if (isRemoved)
                {
                    removedNames = i;
                    isRemoved    = false;
                }
            }

            if (removedNames != -1)
            {
                curConversation.characterNames.RemoveAt(removedNames);
            }
        }
        GUILayout.EndScrollView();

        bool addName = GUILayout.Button("+", GUILayout.MaxWidth(50));

        if (addName)
        {
            if (curConversation.characterNames == null)
            {
                curConversation.characterNames = new List <string>();
            }
            string newName = "New Name";
            curConversation.characterNames.Add(newName);
            GUI.FocusControl(null);
        }
        GUILayout.EndArea();

        // Dialogue List
        GUILayout.BeginArea(new Rect(510, 32, 150, 300));
        GUILayout.Box("Dialogue Patterns", titleText, GUILayout.Width(150), GUILayout.Height(20));
        patternScrollPos = GUILayout.BeginScrollView(patternScrollPos, new GUIStyle("RL Background"), GUILayout.Width(300), GUILayout.Height(position.height - 400));
        if (curConversation.dialoguePattern != null && curConversation.dialoguePattern.Count > 0)
        {
            int removeDialogue = -1;
            for (int i = 0; i < curConversation.dialoguePattern.Count; i++)
            {
                {
                    bool isClick  = false;
                    bool isRemove = false;
                    GUILayout.BeginHorizontal();
                    isClick  = GUILayout.Button(curConversation.dialoguePattern[i].charName, (selectedPatternIdx == i) ? selectedText : notSelectedText, GUILayout.MinWidth(90));
                    isRemove = GUILayout.Button("-", GUILayout.MaxWidth(50));
                    GUILayout.EndHorizontal();

                    if (isClick)
                    {
                        selectedPatternIdx = i;

                        isClick = false;
                        GUI.FocusControl(null);
                    }

                    if (isRemove)
                    {
                        removeDialogue = i;
                        isRemove       = false;
                    }
                }
            }
            if (removeDialogue != -1)
            {
                curConversation.dialoguePattern.RemoveAt(removeDialogue);
            }
        }
        GUILayout.EndScrollView();
        if (curConversation.characterNames != null && curConversation.characterNames.Count > 0)
        {
            bool addDialogue = GUILayout.Button("+", GUILayout.MaxWidth(50));

            if (addDialogue)
            {
                if (curConversation.dialoguePattern == null)
                {
                    curConversation.dialoguePattern = new List <DialogueBy>();
                }

                DialogueBy tmp = new DialogueBy();
                if (curConversation.characterNames != null && curConversation.characterNames.Count > 0)
                {
                    tmp.charName = curConversation.characterNames[0];
                }
                else
                {
                    tmp.charName = "[New]";
                }

                curConversation.dialoguePattern.Add(tmp);
                GUI.FocusControl(null);
            }
        }
        GUILayout.EndArea();
    }
    public void ShowDialogueList()
    {
        bool addEvent    = false;
        bool saveEvent   = false;
        bool removeEvent = false;

        GUILayout.BeginArea(new Rect(680, 10, 400, position.height - 375));
        GUILayout.BeginHorizontal();
        GUILayout.Box("Conversations", titleText, GUILayout.Width(295), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        dialogueListScrollPos = GUILayout.BeginScrollView(dialogueListScrollPos, new GUIStyle("RL Background"), GUILayout.Width(300), GUILayout.Height(position.height - 400));

        if (curDialogueStorageData.conversationList != null && curDialogueStorageData.conversationList.Count > 0)
        {
            for (int i = 0; i < curDialogueStorageData.conversationList.Count; i++)
            {
                bool   isClicked = false;
                string listName  = "";

                GUILayout.BeginHorizontal();
                isClicked = GUILayout.Button(curDialogueStorageData.conversationList[i].conversationTitle, (selectedConversation != null && curDialogueStorageData.conversationList[i].conversationTitle == selectedConversation.conversationTitle) ? selectedText : notSelectedText);
                if (!string.IsNullOrEmpty(curDialogueStorageData.conversationList[i].conversationTitle))
                {
                    if (curDialogueStorageData.conversationList[i].dialoguePattern != null &&
                        curDialogueStorageData.conversationList[i].dialoguePattern.Count > 0)
                    {
                        listName = "[Length: " + curDialogueStorageData.conversationList[i].dialoguePattern.Count + "]";
                    }
                    else
                    {
                        listName = "[Length: 0]";
                    }
                    GUILayout.Label(listName);
                }
                GUILayout.EndHorizontal();
                if (isClicked)
                {
                    if (curDialogueStorageData.conversationList[i] != null)
                    {
                        selectedConversation    = curDialogueStorageData.conversationList[i];
                        selectedConversationIdx = i;
                        curConversation         = selectedConversation;
                    }
                    isClicked = false;
                }
            }
        }

        GUILayout.EndArea();
        GUILayout.EndScrollView();

        GUILayout.BeginArea(new Rect(680, position.height - 360, 400, 225));

        GUILayout.BeginHorizontal();
        if (curConversation == null)
        {
            curConversation = new ConversationInformationData();
        }
        saveEvent = GUILayout.Button((curConversation == selectedConversation) ? "Modify" : "Save", GUILayout.MaxWidth(100));
        if (curDialogueStorageData.conversationList.Find(x => x.conversationTitle == curConversation.conversationTitle) != null)
        {
            addEvent = GUILayout.Button("Create New", GUILayout.MaxWidth(100));
        }
        if (curDialogueStorageData.conversationList.Find(x => x.conversationTitle == curConversation.conversationTitle) != null)
        {
            removeEvent = GUILayout.Button("Remove", GUILayout.MaxWidth(100));
        }
        GUILayout.EndHorizontal();

        GUILayout.EndArea();

        // ADD BUTTON
        if (addEvent)
        {
            curConversation      = new ConversationInformationData();
            selectedConversation = null;
        }
        // REMOVE BUTTON
        if (removeEvent)
        {
            GUI.FocusControl(null);
            removeEvent = false;
            if (selectedConversation != null)
            {
                curDialogueStorageData.conversationList.RemoveAt(selectedConversationIdx);
                selectedConversation = null;
                curConversation      = new ConversationInformationData();
            }
        }
        // SAVE BUTTON
        if (saveEvent && !string.IsNullOrEmpty(curConversation.conversationTitle))
        {
            if (curDialogueStorageData.conversationList == null)
            {
                curDialogueStorageData.conversationList = new List <ConversationInformationData>();
            }
            if (curDialogueStorageData.conversationList.Find(x => x.conversationTitle == curConversation.conversationTitle) == null)
            {
                curDialogueStorageData.conversationList.Add(curConversation);
                curConversation = new ConversationInformationData();
            }
            else
            {
                // MODIFY CURRENT EVENT
                if ((curConversation == selectedConversation))
                {
                    curDialogueStorageData.conversationList[selectedConversationIdx] = curConversation;
                    curConversation      = new ConversationInformationData();
                    selectedConversation = null;
                }
                else
                {
                    Debug.LogError("MULTIPLE EVENTS WITH SAME TITLE OCCURRED, PLEACE CHECK LIST!");
                }
            }
            GUI.FocusControl(null);
            saveEvent = false;
            Save();
        }
    }