private void EnterObstacle(Transform obstacleTrans) { Obstacle obstacle = obstacleTrans.GetComponent <Obstacle>(); Consumables tool = Player.mainPlayer.allConsumablesInBag.Find(delegate(Consumables obj) { return(obj.itemName == obstacle.destroyToolName); }); if (tool != null) { expUICtr.GetComponent <BattlePlayerUIController> ().SetUpToolChoicePlane(obstacle, tool); } else { string tint = string.Format("缺少{0}x1", obstacle.destroyToolName); expUICtr.SetUpTintHUD(tint, null); } }