/** * <summary>Sets the point to continue from, when a Conversation's options are overridden by an ActionConversation.</summary> * <param title = "actionConversation">The "Dialogue: Start conversation" Action that is overriding the Conversation's options</param> */ public void SetConversationPoint(ActionConversation actionConversation) { if (actionConversation == null) { activeConversationPoint = new SkipList(); } foreach (ActionList actionList in activeLists) { foreach (Action action in actionList.actions) { if (action == actionConversation) { activeConversationPoint = new SkipList(actionList, actionList.actions.IndexOf(action)); if (!(actionList is RuntimeActionList)) { actionList.Kill(); } return; } } } }
public SkipList(SkipList _skipList) { actionList = _skipList.actionList; actionListAsset = _skipList.actionListAsset; startIndex = _skipList.startIndex; }
/** * <summary>Attempts to override a Conversation object's default options by resuming an ActionList from the last ActionConversation.</summary> * <param title = "optionIndex">The index number of the chosen dialogue option.</param> * <returns>True if the override was succesful.</returns> */ public bool OverrideConversation(int optionIndex) { KickStarter.playerInput.lastConversationOption = optionIndex; SkipList tempPoint = new SkipList (activeConversationPoint); activeConversationPoint = new SkipList (); if (tempPoint != null && (tempPoint.actionList != null || tempPoint.actionListAsset != null)) { tempPoint.Resume (); return true; } KickStarter.playerInput.lastConversationOption = -1; // return false; }
/** * <summary>Sets the point to continue from, when a Conversation's options are overridden by an ActionConversation.</summary> * <param title = "actionConversation">The "Dialogue: Start conversation" Action that is overriding the Conversation's options</param> */ public void SetConversationPoint(ActionConversation actionConversation) { if (actionConversation == null) { activeConversationPoint = new SkipList(); } foreach (ActionList actionList in activeLists) { foreach (Action action in actionList.actions) { if (action == actionConversation) { activeConversationPoint = new SkipList (actionList, actionList.actions.IndexOf (action)); if (!(actionList is RuntimeActionList)) { actionList.Kill (); } return; } } } }
/** * <summary>A Constructor that copies the values of another SkipList.</summary> * <param name = "_skipList">The SkipList to copy</param> */ public SkipList(SkipList _skipList) { actionList = _skipList.actionList; actionListAsset = _skipList.actionListAsset; startIndex = _skipList.startIndex; }