示例#1
0
 public void Activate()
 {
     if (!active)
     {
         moveButton.onClick.AddListener(delegate() {
             Deactivate();
             move.Activate(null, null);
         });
         searchButton.onClick.AddListener(delegate() {
             Deactivate();
             search.Activate(app.ActivePlayer.PlayerModel.thisObj.transform.position);
         });
         inventoryButton.onClick.AddListener(delegate() {
             Deactivate();
             inventory.Activate(app.ActivePlayer, itemUsed, scrollUsed);
         });
         playerDataButton.onClick.AddListener(delegate() {
             Deactivate();
             playerData.Activate(app.ActivePlayer);
         });
         thisObj.SetActive(true);
         active = true;
     }
 }
示例#2
0
 /// <summary>
 /// Activate inventory UI and subscribe to deactivate if mouse stop pressing or moved from bag or its UI
 /// </summary>
 private void ActivateInventory()
 {
     _inventoryUI.Activate();
     _inputManager.TouchMoved += InputManagerOnTouchMoved;
     _inputManager.TouchExit  += DeactivateInventory;
 }