Esempio n. 1
0
 public void PrepareAction()
 {
     if (PrimaryAction != null)
     {
         PrimaryAction.Prepare();
     }
 }
Esempio n. 2
0
 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();
 }
Esempio n. 4
0
 public ActionDefinition(
     DirectionalAction dirAction,
     PrimaryAction primaryAction,
     SecondaryAction secondAction
     )
 {
     this.DirectionalAction = dirAction;
     this.PrimaryAction = primaryAction;
     this.SecondaryAction = secondAction;
 }
Esempio n. 5
0
            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);
            }
Esempio n. 6
0
 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();
            }
        }
Esempio n. 8
0
        public Object UpdatePrimaryAction(PrimaryAction primaryAction)
        {
            bool result = data.UpdatePrimaryAction(primaryAction);

            return(new { result });
        }
Esempio n. 9
0
        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));
 }