public void UpdateCutsceneList() { ClearLists(); foreach (string label in GridCrafter.CutsceneDataManager.CutsceneCollection.Keys) { if (Label == label) { continue; } CutsceneTriggerInfo trigger = GridCrafter.CutsceneDataManager.GetTrigger(label); GameObject triggerInfoItem = Instantiate(TriggerItem); triggerInfoItem.GetComponent <PreTriggerItemScript>().AvailableUpdate(label, trigger.TriggerLimit); triggerInfoItem.GetComponent <PreTriggerItemScript>().ParentScript = this; AvailableTriggerList.Add(triggerInfoItem); } UpdateListPositions(); }
public void EditTrigger() { CutsceneTriggerInfo trigger = GridCrafter.CutsceneDataManager.GetTrigger(Label); if (trigger is LowHealthTriggerInfo) { GameObject AddCharactersMenu = Instantiate(AddLowHealthTriggerMenu); AddCharactersMenu.GetComponent <LowHealthTriggerScript>().SourceMenu = SourceMenu.gameObject; AddCharactersMenu.GetComponent <LowHealthTriggerScript>().LoadCutscene((LowHealthTriggerInfo)trigger, GridCrafter.CutsceneDataManager.GetTargets(Label)); SourceMenu.gameObject.SetActive(false); } if (trigger is PushObjectTriggerInfo) { GameObject AddCharactersMenu = Instantiate(AddPushObjectTriggerMenu); AddCharactersMenu.GetComponent <PushObjectTriggerScript>().SourceMenu = SourceMenu.gameObject; AddCharactersMenu.GetComponent <PushObjectTriggerScript>().LoadCutscene((PushObjectTriggerInfo)trigger, GridCrafter.CutsceneDataManager.GetTargets(Label)); SourceMenu.gameObject.SetActive(false); } if (trigger is PlayerEnterTriggerInfo) { GameObject AddCharactersMenu = Instantiate(AddPlayerEnterTriggerMenu); AddCharactersMenu.GetComponent <PlayerEnterTriggerScript>().SourceMenu = SourceMenu.gameObject; AddCharactersMenu.GetComponent <PlayerEnterTriggerScript>().LoadCutscene((PlayerEnterTriggerInfo)trigger, GridCrafter.CutsceneDataManager.GetTargets(Label)); SourceMenu.gameObject.SetActive(false); } if (trigger is TurnsPassedTriggerInfo) { GameObject AddCharactersMenu = Instantiate(AddTurnsPassedTriggerMenu); AddCharactersMenu.GetComponent <TurnsPassedTriggerScript>().SourceMenu = SourceMenu.gameObject; AddCharactersMenu.GetComponent <TurnsPassedTriggerScript>().LoadCutscene((TurnsPassedTriggerInfo)trigger, GridCrafter.CutsceneDataManager.GetTargets(Label)); SourceMenu.gameObject.SetActive(false); } }