private void UpdateNextCTP() { var lastCTP = _nextCTP; var res = (from p in CATPairs where p.KeyTime > _nextCTP.KeyTime orderby p.KeyTime select p).ToList(); _nextCTP = res.First(); }
private void Init() { CompsScatteredSoFar = 0; OverlappedComponents = 0; UpdateActionsIds = new List <UpdateActionPair>(); //CookieFrogMinDist = Int32.MaxValue; ActionsSoFar = 0; _rand = new Random(DateTime.Now.Millisecond); _placedCompSoFar = new List <Vector2>(); //this.CATPairs[3].KeyTime = 412; //CATPairs[2].KeyTime = 367; IsPathIntersection = false; _ropeId = 0; _bubbleId = 0; IsSuccess = false; Simulator = new PlayabilitySimulatorEngineProlog(false); Actions = new List <Action>(); _rand = new Random(DateTime.Now.Millisecond); InitializeRanges(); _nextCTP = CATPairs[0]; String[] args = new String[2]; String ropesStr = String.Empty; if (_isRopesRandomized) { ropesStr = GenerateRopesString(); } else { ropesStr = GenerateRopesStringFromCatPairs(); } LevelStr = "cookie(200, 300)" + ropesStr; args[1] = LevelStr; LevelBuilder.CreateRestedLevel(LevelStr, false); AddCandyPlacement(); if (IsTesting) { Shotter.TakeEngineShot(false); } }