public void OnHeldAction(RagdollHand ragdollHand, Handle handle, Interactable.Action action) { if (action == Interactable.Action.UseStart) { if (ragdollHand.side == Side.Right) { rightHand = ragdollHand; } else { leftHand = ragdollHand; } } else if (action == Interactable.Action.UseStop || action == Interactable.Action.Ungrab) { if (ragdollHand.side == Side.Right) { rightHand = null; } else { leftHand = null; } } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.UseStart && !isChanging) { isChanging = true; } }
public void OnHeldAction(RagdollHand interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.AlternateUseStart) { ToggleWeapon(); } if (action == Interactable.Action.Grab) { if (interactor.playerHand == Player.local.handRight) { itemInRightHand = true; } if (interactor.playerHand == Player.local.handLeft) { itemInLeftHand = true; } } if (action == Interactable.Action.Ungrab) { if (interactor.playerHand == Player.local.handRight) { itemInRightHand = false; } if (interactor.playerHand == Player.local.handLeft) { itemInLeftHand = false; } } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.UseStart) { if (interactor.side == Side.Right) { rightInteractor = interactor; } else { leftInteractor = interactor; } } else if (action == Interactable.Action.UseStop || action == Interactable.Action.Ungrab) { if (interactor.side == Side.Right) { rightInteractor = null; } else { leftInteractor = null; } } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.AlternateUseStop && burialHolder.holdObjects.Count == 0) { isChanging = true; } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.UseStart) { if (interactor.side == Side.Right) { ExecuteAction(module.rightGripPrimaryAction); } else { ExecuteAction(module.leftGripPrimaryAction); } } else if (action == Interactable.Action.AlternateUseStart) { if (interactor.side == Side.Right) { ExecuteAction(module.rightGripSecondaryAction); } else { ExecuteAction(module.leftGripSecondaryAction); } } }
public void OnHeldAction(RagdollHand interactor, Handle handle, Interactable.Action action) { if (handle.Equals(secondaryHandle) && action == Interactable.Action.UseStart && ((Time.time - prevShot) > module.fireDelay)) { prevShot = Time.time; Fire(); } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (isHolding) { // If priamry hold action available if (!string.IsNullOrEmpty(module.primaryGripPrimaryActionHold)) { // start primary control timer if (action == Interactable.Action.UseStart) { primaryControlHoldTime = module.controlHoldTime; } else if (action == Interactable.Action.UseStop) { // if not held for long run standard action if (primaryControlHoldTime > 0 && primaryControlHoldTime > (primaryControlHoldTime / 2)) { ExecuteAction(module.primaryGripPrimaryAction, interactor); } primaryControlHoldTime = 0; } } else { if (action == Interactable.Action.UseStart) { ExecuteAction(module.primaryGripPrimaryAction, interactor); } } // If secondary hold action available if (!string.IsNullOrEmpty(module.primaryGripSecondaryActionHold)) { // start secondary control timer if (action == Interactable.Action.AlternateUseStart) { secondaryControlHoldTime = module.controlHoldTime; } else if (action == Interactable.Action.AlternateUseStop) { // if not held for long run standard action if (secondaryControlHoldTime > 0 && secondaryControlHoldTime > (secondaryControlHoldTime / 2)) { ExecuteAction(module.primaryGripSecondaryAction, interactor); } secondaryControlHoldTime = 0; } } else { if (action == Interactable.Action.AlternateUseStart) { ExecuteAction(module.primaryGripSecondaryAction, interactor); } } } }
private void ActionKeyPressed(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.AlternateUseStart) { if (!bossPlayer.isInvis) { BecomeInvisible(); } } }
private void Item_OnHeldActionEvent(Interactor interactor, Handle handle, Interactable.Action action) { if (playerHolding) { if (OnHeldActionPlayer != null) { OnHeldActionPlayer(interactor, handle, action); } } }
void MoonlightAction(Interactor interactor, Handle handle, Interactable.Action action) { if (isMoonlight) { if (action == Interactable.Action.AlternateUseStart) { lightBeam = true; } } }
private void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.AlternateUseStart) { altActive = true; } else if (action == Interactable.Action.AlternateUseStop) { altActive = false; } }
public void OnHeldAction(RagdollHand interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.UseStart) { ExecuteAction(module.gripPrimaryAction, interactor); } else if (action == Interactable.Action.AlternateUseStart) { ExecuteAction(module.gripSecondaryAction, interactor); } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.AlternateUseStop) { isChanging = true; } if (action == Interactable.Action.UseStart && gunForm) { Shoot(); } }
public Dialogue(int _id, string _text, Choice[] _choices = null, ChoiceEventArgs _CEA = null, string b = null, string db = null) { iD = _id; text = _text; choices = _choices; setbool = b; setDayBool = db; if (_CEA != null) { CEA = _CEA; Action += _CEA.ChoiceAction; } }
private void Item_OnHeldActionEvent(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.AlternateUseStart) { if ((Time.time - lastUseTime) > (chargeTime + invisibilityTime)) { FXPlayer.StartAllFxOnObject(activeFX); FXPlayer.StopAllFxOnObject(chargedFX); lastUseTime = Time.time; StartCoroutine(InvisibilityCoroutine(interactor.bodyHand.body.creature)); } } }
private void Item_OnHeldActionEvent(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.AlternateUseStart) { if (!active) { ActivateFireBlade(); } else { DeactivateFireBlade(); } } }
private void Item_OnHeldActionEvent(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.AlternateUseStart) { if (!activated) { BladeActivate(true); } else { BladeActivate(false); } } }
public void OnHeldAction(RagdollHand interactor, Handle handle, Interactable.Action action) { if (handle.Equals(gunGrip)) { if (action == Interactable.Action.UseStart) { if (module.waitForReloadAnim && IsAnimationPlaying(Animations, module.reloadAnim)) { return; } triggerPressed = true; if (module.isFlintlock) { StartCoroutine(FlintlockLinkedFire()); } else if (!isFiring) { StartCoroutine(GeneralFire(TrackedFire, TriggerIsPressed, fireModeSelection, module.fireRate, module.burstNumber, emptySound, SetFiringFlag, ProjectileIsSpawning)); } } if (action == Interactable.Action.UseStop || action == Interactable.Action.Ungrab) { // Stop Firing. triggerPressed = false; } if (action == Interactable.Action.AlternateUseStart) { if (module.waitForReloadAnim && IsAnimationPlaying(Animations, module.reloadAnim)) { return; } if (module.allowCycleFireMode && !isEmpty) { if (emptySound != null) { emptySound.Play(); } fireModeSelection = FrameworkCore.CycleFireMode(fireModeSelection, allowedFireModes); //SetFireSelectionAnimator(Animations, fireModeSelection); } else if (isEmpty) { // Reload the weapon ReloadWeapon(); } } } }
public Choice(string _option, ChoiceEventArgs _CEA = null, string setb = null, string checkb = null, string removeItem = null, string[] tutorialContinue = null, string checki = null, string setdb = null) { option = _option; if (_CEA != null) { Action += _CEA.ChoiceAction; CEA = _CEA; } setbool = setb; setDayBool = setdb; checkbool = checkb; checkitem = checki; removeitem = removeItem; tutorialcontinue = tutorialContinue; }
private void Item_OnHeldActionEvent(Interactor interactor, Handle handle, Interactable.Action action) { if (isCharged) { if (action == Interactable.Action.AlternateUseStart) { if (!isActivated) { ActivateBlade(); } else if (isActivated) { DeactivateBlade(); } } } }
public void OnHeldAction(RagdollHand interactor, Handle handle, Interactable.Action action) { if (handle.Equals(attachmentHandle)) { // "Spell-Menu" Action if (action == Interactable.Action.AlternateUseStart) { spellMenuPressed = true; StartLongPress(); } if (action == Interactable.Action.AlternateUseStop) { spellMenuPressed = false; } } }
private void Awake() { item = this.GetComponent <Item>(); module = item.data.GetModule <ItemModuleCycleCharge>(); item.OnHeldActionEvent += OnHeldAction; counter = 0; if (module.useTriggerToCycle) { triggerAction = Interactable.Action.UseStart; } else { triggerAction = Interactable.Action.AlternateUseStart; } TryGetItemImbue(); }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.UseStart) { if (interactor.side == Side.Right) { rightInteractor = interactor; } else { leftInteractor = interactor; } } else if (action == Interactable.Action.AlternateUseStart) { // trigger all the secondary actions if ((interactor.side == Side.Right && holdingGunGripRight) || (interactor.side == Side.Left && holdingGunGripLeft)) { ExecuteAction(module.gunGripSecondaryAction); } else if ((interactor.side == Side.Right && holdingForeGripRight) || (interactor.side == Side.Left && holdingForeGripLeft)) { ExecuteAction(module.foreGripSecondaryAction); } else if ((interactor.side == Side.Right && holdingScopeGripRight) || (interactor.side == Side.Left && holdingScopeGripLeft)) { ExecuteAction(module.scopeGripSecondaryAction); } else if ((interactor.side == Side.Right && holdingSecondaryGripRight) || (interactor.side == Side.Left && holdingSecondaryGripLeft)) { ExecuteAction(module.secondaryGripSecondaryAction); } } else if (action == Interactable.Action.UseStop || action == Interactable.Action.Ungrab) { if (interactor.side == Side.Right) { rightInteractor = null; } else { leftInteractor = null; } } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (!start && action == Interactable.Action.Ungrab) { start = !start; foreach (Transform child in item.gameObject.transform) { if (child.name == "Colliders") { child.gameObject.SetActive(false); } } } if (action == Interactable.Action.AlternateUseStart) { switch (mode) { case 0: module.fixed_cam = true; module.force3p = true; break; case 1: module.fixed_cam = true; module.force3p = false; break; case 2: module.fixed_cam = false; module.force3p = false; break; default: break; } mode = (mode + 1) % 2; } }
void OnHeld(Interactor interactor, Handle handle, Interactable.Action action) { if (supercharged) { if (action == Interactable.Action.UseStart) { ItsBeamTime(); } if (action == Interactable.Action.UseStop) { isBeaming = false; called2 = true; VFX.Find("Beam").Find("Lightning1").GetComponent <ParticleSystem>().Stop(); if (slowChargeAnimationPlaying) { VFX.Find("Long Charge").Find("Lightning 2").GetComponent <ParticleSystem>().Play(); } if (isQuickCharging) { VFX.Find("Quick Charge").Find("Lightning 2").GetComponent <ParticleSystem>().Play(); } } } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (action == Interactable.Action.AlternateUseStart) { if (effectShock != null) { if (effectShock.isActive) { effectShock.Stop(); } else { effectShock.Play(1, 9999999, 5); } } } if (action == Interactable.Action.Ungrab) { if (effectShock != null) { effectShock.Stop(); } } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (handle != item.mainHandleRight) { return; } if (action == Interactable.Action.UseStart) { StartFX(); triggerHeld = true; } if (action == Interactable.Action.UseStop) { if (timer > module.minCharge) { if (triggerHeld) { float charge = (timer / module.fullCharge) * (module.maxDuration - module.minDuration) + module.minDuration; ShootBubble(charge); } } else { timer = 0f; StopFX(); } triggerHeld = false; } }
public void OnHeldAction(RagdollHand interactor, Handle handle, Interactable.Action action) { if (action == triggerAction) { if (isActive) { return; } if (counter >= module.spellIDs.Length) { counter = 0; activeSpell = null; StartCoroutine(SafeChargeDrain(item.imbues[0], module.energyStepSize)); return; } else { currentSpell = module.spellIDs[counter]; counter++; activeSpell = Catalog.GetData <SpellCastCharge>(currentSpell, true); StartCoroutine(TransferDeltaEnergy(item.imbues[0], activeSpell, module.energyStepSize)); } } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { if (!active) { return; } if (action == Interactable.Action.UseStart) { indicatorVFX.Play(); heldTrigger = true; if (animator) { animator.SetBool("isPressing", true); } handle.SetSliding(interactor, false); } if (action == Interactable.Action.AlternateUseStart) { indicatorVFX.Play(); heldButton = true; if (animator) { animator.SetBool("isPressing", true); } } if (action == Interactable.Action.UseStop) { indicatorVFX.Stop(); heldTrigger = false; if (animator) { animator.SetBool("isPressing", false); } if (heldButton) { heldButton = false; ShootBlast(3, Mode.Portal); } else { ShootBlast(2, Mode.Summon); } } if (action == Interactable.Action.AlternateUseStop) { indicatorVFX.Stop(); if (animator) { animator.SetBool("isPressing", false); } heldButton = false; if (heldTrigger) { ShootBlast(2, Mode.Portal); heldTrigger = false; } else { ShootBlast(3, Mode.Summon); } } }
public void OnHeldAction(RagdollHand interactor, Handle handle, Interactable.Action action) { if (handle.Equals(mainHandle)) { // Trigger Action if (action == Interactable.Action.UseStart) { // Begin Firing triggerPressed = true; if (!isFiring) { StartCoroutine(FrameworkCore.GeneralFire(TrackedFire, TriggerIsPressed, fireModeSelection, module.fireRate, module.burstNumber, emptySound, SetFiringFlag, ProjectileIsSpawning)); } } if (action == Interactable.Action.UseStop) { // End Firing triggerPressed = false; } // "Spell-Menu" Action if (action == Interactable.Action.AlternateUseStart) { spellMenuPressed = true; if (SlideToggleLock()) { return; } StartLongPress(); } if (action == Interactable.Action.AlternateUseStop) { spellMenuPressed = false; } } if (action == Interactable.Action.Grab) { if (handle.Equals(mainHandle)) { if (interactor.playerHand == Player.local.handRight) { mainHandleHeldRight = true; } if (interactor.playerHand == Player.local.handLeft) { mainHandleHeldLeft = true; } if ((mainHandleHeldRight || mainHandleHeldLeft) && (slideController != null)) { slideController.UnlockSlide(); } } if (handle.Equals(slideHandle)) { if (interactor.playerHand == Player.local.handRight) { slideHandleHeldRight = true; } if (interactor.playerHand == Player.local.handLeft) { slideHandleHeldLeft = true; } if (slideController != null) { slideController.SetHeld(true); } slideController.ForwardState(); } } if (action == Interactable.Action.Ungrab) { if (handle.Equals(mainHandle)) { if (interactor.playerHand == Player.local.handRight) { mainHandleHeldRight = false; } if (interactor.playerHand == Player.local.handLeft) { mainHandleHeldLeft = false; } if (!mainHandleHeldRight && !mainHandleHeldLeft) { if (interactor.playerHand == Player.local.handRight) { slideHandleHeldRight = false; } if (interactor.playerHand == Player.local.handLeft) { slideHandleHeldLeft = false; } if (((slideController != null))) { slideController.LockSlide(); } ForceDrop(); } } if (handle.Equals(slideHandle)) { if (slideController != null) { slideController.SetHeld(false); } } } }
public void OnHeldAction(Interactor interactor, Handle handle, Interactable.Action action) { }