public void PrepareAction() { if (PrimaryAction != null) { PrimaryAction.Prepare(); } }
public void ResetAction() { if (PrimaryAction != null) { PrimaryAction.ResetStatus(); } }
internal WeaponTriggerAutofireStructBlockBase(BinaryReader binaryReader) { this.autofireTime = binaryReader.ReadSingle(); this.autofireThrow = binaryReader.ReadSingle(); this.secondaryAction = (SecondaryAction)binaryReader.ReadInt16(); this.primaryAction = (PrimaryAction)binaryReader.ReadInt16(); }
public ActionDefinition( DirectionalAction dirAction, PrimaryAction primaryAction, SecondaryAction secondAction ) { this.DirectionalAction = dirAction; this.PrimaryAction = primaryAction; this.SecondaryAction = secondAction; }
void ProcessGamePad() { var state = GamePad.GetState(player.index); Move = ThumbSticksToVector(state.ThumbSticks.Left); Look = ThumbSticksToVector(state.ThumbSticks.Right); PrimaryAction.Process(state.Triggers.Right, state.Buttons.RightShoulder == ButtonState.Pressed); SecondaryAction.Process(state.Triggers.Left, state.Buttons.LeftShoulder == ButtonState.Pressed); }
public ActionComponent( DirectionalAction direction, SecondaryAction SecondaryAct, PrimaryAction primaryAct, Drift drifting = Drift.None) { this.curDirection = direction; this.secondaryAction = SecondaryAct; this.primaryAction = primaryAct; this.drift = drifting; }
/// <summary> /// Snaps the follow on the primary and secondary action if they are <see cref="GrabInteractableFollowAction"/> type. /// </summary> public virtual void SnapFollowOrientation() { if (PrimaryAction != null && PrimaryAction.GetType() == typeof(GrabInteractableFollowAction)) { GrabInteractableFollowAction action = (GrabInteractableFollowAction)PrimaryAction; action.ForceSnapOrientation(); } if (SecondaryAction != null && SecondaryAction.GetType() == typeof(GrabInteractableFollowAction)) { GrabInteractableFollowAction action = (GrabInteractableFollowAction)SecondaryAction; action.ForceSnapOrientation(); } }
public Object UpdatePrimaryAction(PrimaryAction primaryAction) { bool result = data.UpdatePrimaryAction(primaryAction); return(new { result }); }
public Object AddPrimaryAction(PrimaryAction action) { bool result = data.AddPrimaryAction(action); return(new { result }); }
/// <summary> /// Determines whether the primary grab action is of type <see cref="GrabInteractableNullAction"/>. /// </summary> /// <param name="interactorCount">The amount of grabbing Interactors.</param> /// <returns>Whether the primary grab is of type <see cref="GrabInteractableNullAction"/>.</returns> protected virtual bool PrimaryGrabIsNone(int interactorCount) { return(Facade.GrabbingInteractors.Count > interactorCount && PrimaryAction.GetType() == typeof(GrabInteractableNullAction)); }