public override void ExtractInterests(ChallengeStage stage) { ObstacleDatabase obstacleDatabase = null; bool extractionSuccess = false; base.ExtractInterests(stage); stageComponent = stage; if (stage != null) { obstacleDatabase = stage.GetObstacleDatabase(); if (obstacleDatabase != null) { obstacleModel = obstacleDatabase.GetObstacleModel(obstacleCode); if ((obstacleModel != null) && stage.GetNodeStructurePosition(placementNodeID, ref obstaclePosition)) { obstaclePosition += offsetWithinNode; extractionSuccess = true; } } } if (!extractionSuccess) { stage = null; obstacleModel = null; obstaclePosition = Vector2.zero; } }