void Update() { while (matchDetections.Count > 0) { MatchDetection detection = matchDetections[0]; matchDetections.Remove(detection); if (detection.Block.State == BlockState.Idle) { DetectMatch(detection.Block); } } }
// Update is called once per frame void Update() { //if(Clock.Instance.State != Clock.ClockState.Game) { // return; //} while (matchDetections.Count > 0) { MatchDetection detection = matchDetections [0]; matchDetections.Remove(detection); // ensure that the block is still idle if (detection.Block.State == BlockState.Idle) { DetectMatch(detection.Block); } } }