protected MovingObject NewRampObstacle(int sector, float distance, float minLength) { MovingObject obj = enviroment.GetRampObstacle(minLength); if (obj == null) { throw new System.Exception("Not long enough"); } obj.SetValues(mapValues, sector); obj.transform.parent = parent; obj.SetDistance(distance); obj.Update(); return(obj); }