internal void IncreaseSequenceIndex(ADLSequence seq, int amount) { this.elapsedTimes.Remove(seq.actions[this.sequenceIndexes[seq.name]]); this.singleQueryProperties.Remove(seq.actions[this.sequenceIndexes[seq.name]]); this.sequenceIndexes[seq.name] += amount; this.sequenceIndexes[seq.name] %= seq.actions.Count; }
private string ParseLevelState(string parsingState, Match token) { if (token.Groups["EndName"].Length != 0) { parsingState = this.compilerStack.Pop(); } else if (token.Groups["State"].Length != 0) { ADLState state = new ADLState(token.Groups["State"].Value); this.currentState = state; this.currentAgentScript.states.Add(state); this.compilerStack.Push(parsingState); if (token.Groups["State"].Value.Equals("init") || token.Groups["State"].Value.Equals("des")) { parsingState = "action"; this.Log("Special State : " + token.Groups["State"]); ADLSequence sequence = new ADLSequence("seq"); this.currentSequence = sequence; this.currentState.seqs.Add(sequence); } else { parsingState = "sequence"; this.Log("State : " + token.Groups["State"]); } } return(parsingState); }
private string ParseLevelSequence(string parsingState, Match token) { if (token.Groups["EndState"].Length != 0) { parsingState = this.compilerStack.Pop(); } else if (token.Groups["Sequence"].Length != 0) { this.compilerStack.Push(parsingState); parsingState = "action"; this.Log("Sequence : " + token.Groups["Sequence"]); ADLSequence sequence = new ADLSequence(token.Groups["Sequence"].Value); this.currentSequence = sequence; this.currentState.seqs.Add(sequence); } return(parsingState); }
internal void IncreaseSequenceIndex(ADLSequence seq) { this.IncreaseSequenceIndex(seq, 1); }