public void TryLoadDialog(DialogLoadType loadType) { if (_theGameManager.PhaseEvents[_theGameManager.PhaseIndex - 1].ContainsLoadType(loadType)) { FindCurrentDialog(_theGameManager.CurrentLocation, loadType); } else { return; } }
public bool ContainsLoadType(DialogLoadType loadType) { for (int i = 0; i < events.Count; i++) { if (events[i].LoadType == loadType) { return(true); } } return(false); }
public void FindCurrentDialog(CameraLocations location, DialogLoadType loadType) //Date and time as other params possibly { string path = "Resources/DialogInstances/"; path += "Phase" + _theGameManager.PhaseIndex + 1; switch (location) { case CameraLocations.DECK: path += "Deck/"; break; case CameraLocations.DREAM: path += "Dream/"; break; case CameraLocations.UP: path += "BelowDeckUp/"; break; case CameraLocations.FORWARD: path += "BelowDeckForward/"; break; case CameraLocations.RIGHT: path += "BelowDeckRight/"; break; case CameraLocations.LEFT: path += "BelowDeckLeft/"; break; default: break; } path += loadType.ToString(); CurrentInstance = (DialogInstance)Resources.Load(path); }