protected MovingObject NewObstacle(int sector, float distance) { MovingObject obj = enviroment.GetObstacle(); obj.SetValues(mapValues, sector); obj.transform.parent = parent; obj.SetDistance(distance); obj.Update(); return(obj); }