public NodePort GetForwardingPort() { NodePort selectorPort = GetOutputPort("selections"); int selectValue = GetInputValue <int>("select"); int numPorts = DynamicPorts.Count(); if (selectValue > numPorts || selectValue < 0) { return(null); } return(DynamicPorts.ElementAt(selectValue)); }
public override IEnumerator Execute(UVNFManager managerCallback, UVNFCanvas canvas) { List <string> choiceList = Choices; if (ShuffleChocies) { choiceList.Shuffle(); } canvas.DisplayChoice(choiceList.ToArray(), HideDialogue); while (canvas.ChoiceCallback == -1) { yield return(null); } if (DynamicPorts.ElementAt(canvas.ChoiceCallback).IsConnected) { int choice = canvas.ChoiceCallback; canvas.ResetChoice(); managerCallback.AdvanceStoryGraph(DynamicPorts.ElementAt(choice).Connection.node as StoryElement); } }
public void RemoveChoice(int index) { Choices.RemoveAt(index); RemoveDynamicPort(DynamicPorts.ElementAt(index)); }