public override void CallAction() { int CheckingID = 0; int EndID = 0; bool checking = true; for (int i = 0; i < data.Count; ++i) { if ((NodeTypes)(int)data[i]["TypeID"] == NodeTypes.StartNode) { CheckingID = (int)data[i]["NextID"]; } } while (checking) { for (int i = 0; i < data.Count; ++i) { if ((int)data[i]["ID"] == CheckingID) { if ((NodeTypes)(int)data[i]["TypeID"] == NodeTypes.EndingNode) { EndID = (int)data[i]["EndID"]; checking = false; break; } if ((NodeTypes)(int)data[i]["TypeID"] == NodeTypes.ProgressNode) { //now, the individual checks CheckingID = TextParser.CheckProgress(data[i]); } if ((NodeTypes)(int)data[i]["TypeID"] == NodeTypes.ChangeNode) { //now, the individual checks CheckingID = TextParser.MakeProgress(data[i]); } } } } if (CallOnFinish.Count < EndID) { return; } Destination = CallOnFinish[EndID]; }
void CheckChain(DefaultEvent eventdata) { int CheckingID = 0; int EndID = 0; bool checking = true; for (int i = 0; i < ChainData.Count; ++i) { if ((NodeTypes)(int)ChainData[i]["TypeID"] == NodeTypes.StartNode) { CheckingID = (int)ChainData[i]["NextID"]; } } while (checking) { for (int i = 0; i < ChainData.Count; ++i) { if ((int)ChainData[i]["ID"] == CheckingID) { if ((NodeTypes)(int)ChainData[i]["TypeID"] == NodeTypes.EndingNode) { EndID = (int)ChainData[i]["EndID"]; checking = false; break; } if ((NodeTypes)(int)ChainData[i]["TypeID"] == NodeTypes.ProgressNode) { //now, the individual checks CheckingID = TextParser.CheckProgress(ChainData[i]); } if ((NodeTypes)(int)ChainData[i]["TypeID"] == NodeTypes.ChangeNode) { //now, the individual checks CheckingID = TextParser.MakeProgress(ChainData[i]); } } } } if (callOnFinish.Length < EndID) { return; } if (CallOtherObjectOnFinish[EndID] == false) { if (callOnFinish[EndID] == EventListener.Owner) { EventSystem.DispatchEvent(gameObject, SayOnFinish[EndID]); } else if (callOnFinish[EndID] == EventListener.Space) { Space.DispatchEvent(SayOnFinish[EndID]); } } else { EventSystem.DispatchEvent(OtherObject[EndID], SayOnFinish[EndID]); } }
public override void CallAction() { Destination = TextParser.CheckProgress(data); }