Ejemplo n.º 1
0
    protected override void Start()
    {
        base.Start();
        pocket = FindObjectOfType <Pocket>();
        pocket.SetSelectedConsumeCallback(OnSelectedConsumable);
        pocket.SetDeselectedCallback(delegate {
            if (currentItemAction != null)
            {
                Interactable.buttonA.RemoveAction(currentItemAction);
            }
        });

        GameObject buttonObj = GameObject.Find(Constants.BUTTON_B_TAG);

        buttonB = buttonObj.GetComponent <ActionButton>();
        buttonB.AddAction(delegate {
            Attack();
        });

        UpdateUIInfo();
        UpdateVisibleFloorWithGameManager();
    }