public Choice AddChoiceEnemy(String choiceName, Enemy monster, ChoiceControler choiceControler = null) { if (choiceControler == null) { choiceControler = this; } Choice cho = choiceControler.GetChoice(choiceName); cho.EnemyList.Add(monster); cho.TextArrangement(); return(cho); }
public String ChoicePick(DisplayTextGame DTG, ChoiceControler CC, String currentChoice) { ConsoleKeyInfo c; if (CC.GetChoiceClone(currentChoice).ChoiceType == ChoiceType.QUICKNEXT) { return(currentChoice); } while (true) { DTG.Init(false); DTG.Cho = CC.GetChoiceClone(currentChoice); DTG.Show(); c = Console.ReadKey(); DTG.SelectingText(c); if (c.Key == ConsoleKey.Enter) { DTG.InitSelect(); return((String)DTG.Cho.GetValueOn(DTG.currentSelectNum)); } } return(currentChoice); }
public Choice ChangeChoiceText(String choiceName, ChoiceControler choiceControler = null, TextAndPosition onlyShowText = null, TextAndPosition selectText = null, List <TextAndPosition> streamText = null, TextAndPosition returnText = null) { if (choiceControler == null) { choiceControler = this; } //testLog(choiceName); Choice cho = choiceControler.GetChoice(choiceName); if (onlyShowText != null) { cho.OnlyShowText = new List <TextAndPosition>() { onlyShowText }; } if (selectText != null) { cho.SelectText = new List <TextAndPosition>() { selectText }; } if (streamText != null) { cho.StreamText = streamText; } if (returnText != null) { cho.ReturnText = new List <TextAndPosition>() { returnText }; } cho.TextArrangement(); return(cho); }