public void SetActionBtn(ItemActionType _left, ItemActionType _middle, ItemActionType _right, ItemActionType _other) { HideAllBtn(); // gamesBtn.Clear(); if (curEquipInfo == null) { return; } string name = curEquipInfo.GetItemActionName(_left); if (name != string.Empty) { ShowButton(leftButton, leftButtonText, name, x1 => { // if(_left == ItemActionType.SelectAdd){ // InventoryUtility.TryToSelect(this.curEquipInfo); // }else{ // curEquipInfo.DoItemAction(_left); // } curEquipInfo.DoItemAction(_left); Close(leftButton.gameObject); }); } name = curEquipInfo.GetItemActionName(_middle); if (name != string.Empty) { ShowButton(middleButton, middleButtonText, name, x2 => { // if(name == "强 化"){ // InventoryUtility.Strengthen(this.curEquipInfo); // }else{ // if(_middle == ItemActionType.SelectAdd){ // InventoryUtility.TryToSelect(this.curEquipInfo); // }else{ // curEquipInfo.DoItemAction(_middle); // } curEquipInfo.DoItemAction(_middle); Close(middleButton.gameObject); // } }); } name = curEquipInfo.GetItemActionName(_right); if (name != string.Empty) { ShowButton(rightButton, rightButtonText, name, x3 => { // if(_right == ItemActionType.SelectAdd){ // InventoryUtility.TryToSelect(this.curEquipInfo); // }else{ // curEquipInfo.DoItemAction(_right); // } curEquipInfo.DoItemAction(_right); Close(rightButton.gameObject); }); } name = curEquipInfo.GetItemActionName(_other); if (name != string.Empty) { ShowButton(accessButton, accessButtonText, name, x4 => { // if(_right == ItemActionType.SelectAdd){ // InventoryUtility.TryToSelect(this.curEquipInfo); // }else{ // curEquipInfo.DoItemAction(_right); // } curEquipInfo.DoItemAction(_other); Close(accessButton.gameObject); }); } }