示例#1
0
 void Start()
 {
     inventory       = GameObject.FindGameObjectWithTag("Player").GetComponent <InventoryController>();
     items           = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MouseController>();
     cameraTransform = Camera.main.gameObject.transform;
 }
示例#2
0
 public void BindCommandToButton(Button button, ICommand command, InventoryController inventoryController)
 {
     buttonToCommand.Add(button, command);
     button.onClick.AddListener(() => buttonToCommand[button]?.Execute(inventoryController));
 }
示例#3
0
        public virtual void Update(InventoryController controller)
        {
            ICommand input = HandleInput();

            input?.Execute(controller);
        }