// Update is called once per frame void Update() { if (fpsController.enabled) { EquipSystem equipSystem = GetComponent <EquipSystem>(); if (CrossPlatformInputManager.GetButtonDown("Interact") && itemInView != null) { //Interacting with objects in the world itemInView.GetComponent <InteractableBase>().OnInteract(); } else if (equipSystem && equipSystem.currentEquippedItem) { Pickupable pickupable = equipSystem.currentEquippedItem.GetComponent <Pickupable>(); if (pickupable) { //Using item that the player has equipped if (CrossPlatformInputManager.GetButtonDown("Fire1")) { pickupable.OnUse(); UseItem?.Invoke(pickupable); } else if (CrossPlatformInputManager.GetButtonDown("DropItem")) { equipSystem.DropItem(pickupable.item); } } } } if (CrossPlatformInputManager.GetButtonDown("Cancel")) { CancelAction?.Invoke(); } }
public static void Initialize() { Page = ExpansionKitApi.CreateCustomFullMenuPopup(LayoutDescription.WideSlimList); Page.AddLabel("Title", new Action <GameObject>((obj) => { titleObject = obj; })); Page.AddLabel("Waiting for key...", new Action <GameObject>((obj) => { textObject = obj; })); Page.AddSimpleButton("Clear", new Action(() => { selectedKeys.Clear(); })); Page.AddSimpleButton("Accept", new Action(() => { AcceptAction?.Invoke(selectedKeys); fetchingKeys = false; Page.Hide(); })); Page.AddSimpleButton("Cancel", new Action(() => { CancelAction?.Invoke(); fetchingKeys = false; Page.Hide(); })); }
private void Cancel() { StepViewModel.CancelAction?.Invoke(); CancelAction?.Invoke(); }
/// <summary> /// 取消 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnCancel_Click(object sender, RoutedEventArgs e) { CancelAction?.Invoke(); }
/// <summary> /// Cancels this instance. /// </summary> public void Cancel() { Close(); CancelAction?.Invoke(); }
public void Cancel() { MainViewModel.HidePopup(); CancelAction.Invoke(); }
private void Cancel() { CancelAction?.Invoke(); }
public void OnTransitionCancel(Transition p0) { CancelAction?.Invoke(); }
public void CancelClicked() { CancelAction?.Invoke(); }