protected override void Awake()
 {
     base.Awake();
     AnimationControl = CharacterBodyParts.AnimationControl;
     CamControl       = CharacterBodyParts.FirstPersonCameraControl;
     PlayerInputs     = new WorldTriggerInputs();
     PlayerInputs.Enable();
     PlayerInputs.Player.Move.performed      += ctx => OnMove(ctx);
     PlayerInputs.Player.Look.performed      += ctx => OnLook(ctx);
     PlayerInputs.Player.Melee.performed     += ctx => OnMelee(ctx);
     PlayerInputs.Player.Jump.performed      += ctx => OnJump(ctx);
     PlayerInputs.Player.LeanLeft.performed  += ctx => OnLeanLeft(ctx);
     PlayerInputs.Player.LeanRight.performed += ctx => OnLeanRight(ctx);
     PlayerInputs.Player.Attach.performed    += ctx => OnAttach(ctx);
     PlayerInputs.Player.Prone.performed     += ctx => OnProne(ctx);
     PlayerInputs.Player.Crouch.performed    += ctx => OnCrouch(ctx);
     PlayerInputs.Player.SwapToMainTriggerSlot1.performed     += ctx => OnSwapToMainTriggerSlot1(ctx);
     PlayerInputs.Player.SwapToMainTriggerSlot2.performed     += ctx => OnSwapToMainTriggerSlot2(ctx);
     PlayerInputs.Player.SwapToMainTriggerSlot3.performed     += ctx => OnSwapToMainTriggerSlot3(ctx);
     PlayerInputs.Player.SwapToMainTriggerSlot4.performed     += ctx => OnSwapToMainTriggerSlot4(ctx);
     PlayerInputs.Player.SwaptoSubTrigger1.performed          += ctx => OnSwaptoSubTrigger1(ctx);
     PlayerInputs.Player.SwaptoSubTrigger2.performed          += ctx => OnSwaptoSubTrigger2(ctx);
     PlayerInputs.Player.SwaptoSubTrigger3.performed          += ctx => OnSwaptoSubTrigger3(ctx);
     PlayerInputs.Player.SwaptoSubTrigger4.performed          += ctx => OnSwaptoSubTrigger4(ctx);
     PlayerInputs.Player.ToggleSwapRightMainTrigger.performed += ctx => OnToggleSwapRightMainTrigger(ctx);
     PlayerInputs.Player.ToggleSwapLeftMainTrigger.performed  += ctx => OnToggleSwapLeftMainTrigger(ctx);
     PlayerInputs.Player.ToggleSwapRightSubTrigger.performed  += ctx => OnToggleSwapRightSubTrigger(ctx);
     PlayerInputs.Player.ToggleSwapLeftSubTrigger.performed   += ctx => OnToggleSwapLeftSubTrigger(ctx);
     PlayerInputs.Player.Info.performed   += ctx => OnInfo(ctx);
     PlayerInputs.Player.Menu.performed   += ctx => OnMenu(ctx);
     PlayerInputs.Player.Sprint.performed += ctx => OnSprint(ctx);
 }
示例#2
0
 private void Awake()
 {
     PlayerInputs = new WorldTriggerInputs();
     PlayerInputs.Enable();
     PlayerInputs.Player.Move.performed      += ctx => OnMove(ctx);
     PlayerInputs.Player.Look.performed      += ctx => OnLook(ctx);
     PlayerInputs.Player.Melee.performed     += ctx => OnMelee(ctx);
     PlayerInputs.Player.Jump.performed      += ctx => OnJump(ctx);
     PlayerInputs.Player.LeanLeft.performed  += ctx => OnLeanLeft(ctx);
     PlayerInputs.Player.LeanRight.performed += ctx => OnLeanRight(ctx);
     PlayerInputs.Player.Attach.performed    += ctx => OnAttach(ctx);
     PlayerInputs.Player.Prone.performed     += ctx => OnProne(ctx);
     PlayerInputs.Player.Crouch.performed    += ctx => OnCrouch(ctx);
     PlayerInputs.Player.SwapToMainTriggerSlot1.performed     += ctx => OnSwapToMainTriggerSlot1(ctx);
     PlayerInputs.Player.SwapToMainTriggerSlot2.performed     += ctx => OnSwapToMainTriggerSlot2(ctx);
     PlayerInputs.Player.SwapToMainTriggerSlot3.performed     += ctx => OnSwapToMainTriggerSlot3(ctx);
     PlayerInputs.Player.SwapToMainTriggerSlot4.performed     += ctx => OnSwapToMainTriggerSlot4(ctx);
     PlayerInputs.Player.SwaptoSubTrigger1.performed          += ctx => OnSwaptoSubTrigger1(ctx);
     PlayerInputs.Player.SwaptoSubTrigger2.performed          += ctx => OnSwaptoSubTrigger2(ctx);
     PlayerInputs.Player.SwaptoSubTrigger3.performed          += ctx => OnSwaptoSubTrigger3(ctx);
     PlayerInputs.Player.SwaptoSubTrigger4.performed          += ctx => OnSwaptoSubTrigger4(ctx);
     PlayerInputs.Player.ToggleSwapRightMainTrigger.performed += ctx => OnToggleSwapRightMainTrigger(ctx);
     PlayerInputs.Player.ToggleSwapLeftMainTrigger.performed  += ctx => OnToggleSwapLeftMainTrigger(ctx);
     PlayerInputs.Player.ToggleSwapRightSubTrigger.performed  += ctx => OnToggleSwapRightSubTrigger(ctx);
     PlayerInputs.Player.ToggleSwapLeftSubTrigger.performed   += ctx => OnToggleSwapLeftSubTrigger(ctx);
     PlayerInputs.Player.Info.performed += ctx => OnInfo(ctx);
     PlayerInputs.Player.Menu.performed += ctx => OnMenu(ctx);
 }
示例#3
0
 public void InitializeAstroid(TriggerSide side)
 {
     Side         = side;
     PlayerInputs = new WorldTriggerInputs();
     PlayerInputs.Disable();
     if (Side == TriggerSide.Main)
     {
         PlayerInputs.Astroid.AstroidCancelMainTrigger.performed += ctx => OnAstroidCancelMainTrigger(ctx);
         PlayerInputs.Astroid.AstroidChargeMainTrigger.performed += ctx => OnAstroidChargeMainTrigger(ctx);
         PlayerInputs.Astroid.AstroidFireMainTrigger.performed   += ctx => OnAstroidFireMainTrigger(ctx);
     }
     else
     {
         PlayerInputs.Astroid.AstroidCancelSubTrigger.performed  += ctx => OnAstroidCancelSubTrigger(ctx);
         PlayerInputs.Astroid.AstroidChargeMainTrigger.performed += ctx => OnAstroidChargeSubTrigger(ctx);
         PlayerInputs.Astroid.AstroidFireMainTrigger.performed   += ctx => OnAstroidFireSubTrigger(ctx);
     }
     PlayerInputs.Astroid.Reload.performed += ctx => OnReload(ctx);
 }