public void SetSteelsSurroundHome(float durationTime) { _map.ClearSurroundHome(); _map.BuildSurroundHome(ObstacleType.Steel, obstacle => { var disappearingObject = obstacle.AddComponent <DisappearingObject>(); disappearingObject.DisappearTime = durationTime; var position = obstacle.transform.position; disappearingObject.Disappeared += () => RebuildSurroundHome(position); }); }