提交
This commit is contained in:
@@ -126,17 +126,19 @@ public class ShowScrews : MonoBehaviour, ICanvasRaycastFilter
|
||||
addHole.onClick.AddListener(OnAddHoleBtnClick);
|
||||
mergeBox.onClick.AddListener(OnMergeBoxBtnClick);
|
||||
clearHole.onClick.AddListener(OnClearHoleBtnClick);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.use_prop, UseProp);
|
||||
|
||||
|
||||
errorBtn.gameObject.SetActive(false);
|
||||
#if !JarvisRelease
|
||||
errorBtn.gameObject.SetActive(true);
|
||||
if (errorBtn == null) return;
|
||||
// #if !JarvisRelease
|
||||
// errorBtn.gameObject.SetActive(true);
|
||||
// if (errorBtn == null) return;
|
||||
|
||||
errorBtn.onClick.AddListener(() =>
|
||||
{
|
||||
GameHelper.SendErrorToServer("TestError 001", LogType.Error.ToString());
|
||||
});
|
||||
#endif
|
||||
// errorBtn.onClick.AddListener(() =>
|
||||
// {
|
||||
// GameHelper.SendErrorToServer("TestError 001", LogType.Error.ToString());
|
||||
// });
|
||||
// #endif
|
||||
|
||||
}
|
||||
|
||||
@@ -1759,9 +1761,24 @@ public class ShowScrews : MonoBehaviour, ICanvasRaycastFilter
|
||||
}
|
||||
}
|
||||
|
||||
public void UseProp()
|
||||
public void UseProp(object a)
|
||||
{
|
||||
|
||||
int type = (int)a;
|
||||
if (type == 0)
|
||||
{
|
||||
_requestStageData.item_costs[0]++;
|
||||
AddHoleLogic();
|
||||
}
|
||||
else if (type == 1)
|
||||
{
|
||||
_requestStageData.item_costs[1]++;
|
||||
MergeBoxLogic();
|
||||
}
|
||||
else if (type == 2)
|
||||
{
|
||||
_requestStageData.item_costs[2]++;
|
||||
ClearHolesLogic(); //清除孔洞到看不见的缓冲区
|
||||
}
|
||||
}
|
||||
|
||||
private void AddHoleLogic()
|
||||
|
||||
Reference in New Issue
Block a user