提交
This commit is contained in:
@@ -13,7 +13,7 @@ public class ItemNumShow : MonoBehaviour
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
GameDispatcher.Instance.AddListener(GameMsg.RefreshItemCount, RefreshItemCount);
|
||||
// GameDispatcher.Instance.AddListener(GameMsg.RefreshItemCount, RefreshItemCount);
|
||||
}
|
||||
private void RefreshItemCount(object obj)
|
||||
{
|
||||
|
||||
@@ -126,6 +126,8 @@ 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
|
||||
@@ -1759,6 +1761,26 @@ public class ShowScrews : MonoBehaviour, ICanvasRaycastFilter
|
||||
}
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
_kongLogics[_curUnlockingHoleCount].SetLockState(false);
|
||||
|
||||
Reference in New Issue
Block a user