private void ExecuteAction(Action nextAction) { long sss = StaticData.UpdatesSoFar; UpdateActionsIds.Add(new UpdateActionPair(StaticData.UpdatesSoFar, nextAction)); Actions.Add(nextAction); Simulator.ActionsFrequency = GenSimAgent.GetActionsFrequency(nextAction); Simulator.RunEngine(new ActionsGenerator(nextAction)); }
public static List <ActionTimePair> ConvertTLEventstoActionTimePair(List <TLEvent> events) { List <ActionTimePair> res = new List <ActionTimePair>(); int tsNow = 15 * 60 + GenSimAgent.VoidInitCount * GenSimAgent.GetActionsFrequency(new VoidAction()); foreach (TLEvent tlEvent in events) { res.Add(new ActionTimePair(tlEvent.eType, tsNow)); tsNow += (int)((tlEvent.TTN / (float)1000) * 60); } return(res); }
public static List <CATimePair> ConvertTLEventstoCATimePair(List <TLEvent> events) { List <CATimePair> res = new List <CATimePair>(); int tsNow = 15 * 60 + GenSimAgent.VoidInitCount * GenSimAgent.GetActionsFrequency(new VoidAction()); foreach (TLEvent tlEvent in events) { if (tlEvent.eType == EventType.RopeCut || tlEvent.eType == EventType.RocketPress || tlEvent.eType == EventType.BumperInteraction || tlEvent.eType == EventType.BlowerPress || tlEvent.eType == EventType.BubblePinch) { res.Add(new ActionTimePair(tlEvent.eType, tsNow)); } else { res.Add(new CompTimePair(GetCompType(tlEvent.eType), tsNow) { Args = tlEvent.Args }); } tsNow += (int)((tlEvent.TTN / (float)1000) * 60); } return(res); }