コード例 #1
0
 public void OnInputAction(InputActionData action_data)
 {
     if (action_data.m_Action == InputsManager.InputAction.ShowSelectDialogNode && GreenHellGame.IsPadControllerActive())
     {
         if (this.m_LastSelectDialogDeactivationTime == 0f || Time.time - this.m_LastSelectDialogDeactivationTime > 0.5f)
         {
             if (!DialogsManager.Get().IsAnyDialogPlaying())
             {
                 if (!HUDSelectDialog.Get().enabled&& Player.Get().m_Animator.GetCurrentAnimatorStateInfo(2).shortNameHash == this.m_IdleHash && HUDSelectDialog.Get().CanShow())
                 {
                     HUDSelectDialog.Get().Activate();
                     this.m_LastSelectDialogDeactivationTime = Time.time;
                     return;
                 }
             }
             else if (HUDSelectDialog.Get().enabled&& !DialogsManager.Get().IsAnyDialogPlaying())
             {
                 HUDSelectDialog.Get().Deactivate();
                 this.m_LastSelectDialogDeactivationTime = Time.time;
                 return;
             }
         }
     }
     else if (action_data.m_Action == InputsManager.InputAction.Button_B && HUDSelectDialog.Get().enabled)
     {
         HUDSelectDialog.Get().Deactivate();
         this.m_LastSelectDialogDeactivationTime = Time.time;
     }
 }
コード例 #2
0
 private void OnDialog()
 {
     if (!DialogsManager.Get().CanSelectDialog())
     {
         return;
     }
     HUDSelectDialog.Get().Activate();
     Player.Get().m_ShouldStartWalkieTalkieController = true;
     if (Player.Get().GetCurrentItem(Hand.Left) == null)
     {
         Player.Get().StartController(PlayerControllerType.WalkieTalkie);
     }
 }
コード例 #3
0
 protected override void Update()
 {
     base.Update();
     if (this.m_LastKeyCode != this.m_InputData.m_KeyCode)
     {
         this.m_KeyText.text = KeyCodeToString.GetString(this.m_InputData.m_KeyCode);
         this.m_LastKeyCode  = this.m_InputData.m_KeyCode;
     }
     if ((this.m_LastSelectDialogDeactivationTime == 0f || Time.time - this.m_LastSelectDialogDeactivationTime > 0.5f) && GreenHellGame.IsPCControllerActive())
     {
         if (InputsManager.Get().IsActionActive(InputsManager.InputAction.ShowSelectDialogNode) && !DialogsManager.Get().IsAnyDialogPlaying())
         {
             if (!HUDSelectDialog.Get().enabled&& Player.Get().m_Animator.GetCurrentAnimatorStateInfo(2).shortNameHash == this.m_IdleHash && !MakeFireController.Get().IsActive())
             {
                 HUDSelectDialog.Get().Activate();
                 this.m_LastSelectDialogDeactivationTime = Time.time;
             }
         }
         else if (HUDSelectDialog.Get().enabled&& !DialogsManager.Get().IsAnyDialogPlaying())
         {
             HUDSelectDialog.Get().Deactivate();
             this.m_LastSelectDialogDeactivationTime = Time.time;
         }
     }
     if (this.m_NewDialogsCount == 0 || HUDSelectDialog.Get().enabled || DialogsManager.Get().IsAnyDialogPlaying())
     {
         if (this.m_NewDialogsObject.activeSelf)
         {
             this.m_NewDialogsObject.SetActive(false);
             return;
         }
     }
     else if (!this.m_NewDialogsObject.activeSelf)
     {
         this.m_NewDialogsObject.SetActive(true);
     }
 }
コード例 #4
0
 private bool CanAttack()
 {
     return(!FightController.s_BlockFight && !MainLevel.Instance.IsPause() && Time.time - MainLevel.Instance.m_LastUnpauseTime >= 0.25f && !this.m_Player.IsDead() && !SwimController.Get().IsActive() && !HUDWheel.Get().enabled&& !BodyInspectionController.Get().IsActive() && !WatchController.Get().IsActive() && !NotepadController.Get().IsActive() && !MapController.Get().IsActive() && this.m_ActionAllowed && !this.m_Player.GetRotationBlocked() && !Inventory3DManager.Get().gameObject.activeSelf&& !HitReactionController.Get().IsActive() && !base.IsBlock() && this.m_CurrentParam != 6 && this.m_CurrentParam != 8 && !ScenarioManager.Get().IsBoolVariableTrue("PlayerMechGameEnding") && !HUDSelectDialog.Get().enabled);
 }
コード例 #5
0
 public void ExecuteTrigger(Trigger trigger, TriggerAction.TYPE action)
 {
     if (this.IsGrabInProgress())
     {
         return;
     }
     if (HUDSelectDialog.Get().enabled)
     {
         return;
     }
     if (Time.time - this.m_LastTrigerExecutionTime < 0.1f)
     {
         return;
     }
     if (!trigger)
     {
         return;
     }
     if (this.m_TriggerToExecute)
     {
         if (Time.time - this.m_TriggerToExecuteTime > 2f)
         {
             this.m_TriggerToExecute       = null;
             this.m_TriggerActionToExecute = TriggerAction.TYPE.None;
         }
         return;
     }
     if (trigger.PlayGrabAnimOnExecute(action))
     {
         if (WalkieTalkieController.Get().IsActive())
         {
             WalkieTalkieController.Get().Stop();
         }
         this.m_TriggerToExecute       = trigger;
         this.m_TriggerActionToExecute = action;
         this.m_TriggerToExecuteTime   = Time.time;
     }
     else
     {
         trigger.OnExecute(action);
         this.m_LastTrigerExecutionTime = Time.time;
     }
     if (action == TriggerAction.TYPE.Take || action == TriggerAction.TYPE.TakeHold || action == TriggerAction.TYPE.TakeHoldLong || action == TriggerAction.TYPE.PickUp)
     {
         Item currentItem = this.m_Player.GetCurrentItem(Hand.Left);
         if (currentItem != null && currentItem.m_Info.m_ID == ItemID.Bow)
         {
             this.m_Animator.SetBool(TriggerController.s_BGrabItemBow, true);
             return;
         }
         if (currentItem != null && currentItem.m_Info.m_ID == ItemID.Bamboo_Bow)
         {
             this.m_Animator.SetBool(TriggerController.s_BGrabItemBambooBow, true);
             return;
         }
         if (currentItem && currentItem.m_Info.IsBow())
         {
             this.m_Animator.SetBool(TriggerController.s_BGrabItemBow, true);
             return;
         }
         if (trigger.PlayGrabAnimOnExecute(action))
         {
             if (WalkieTalkieController.Get().IsActive())
             {
                 WalkieTalkieController.Get().Stop();
             }
             this.m_Animator.SetBool(TriggerController.s_BGrabItem, true);
             return;
         }
     }
     else if (action == TriggerAction.TYPE.DrinkHold)
     {
         this.m_Animator.SetBool(this.m_BDrinkWater, true);
         this.m_TriggerInAction = true;
     }
 }
コード例 #6
0
 protected override bool ShouldShow()
 {
     return(!TriggerController.Get().IsGrabInProgress() && (!HUDSelectDialog.Get().enabled || HUDManager.Get().m_ActiveGroup != HUDManager.HUDGroup.Game) && ((this.IsExpanded() && this.m_TriggerType == HUDTrigger.TriggerType.Normal) || (this.GetTrigger() && this.GetTrigger().CanTrigger() && !this.GetTrigger().m_HideHUD&& (!Inventory3DManager.Get().IsActive() || !Inventory3DManager.Get().m_CarriedItem) && (this.m_TriggerType == HUDTrigger.TriggerType.Normal || !Inventory3DManager.Get().gameObject.activeSelf))));
 }
コード例 #7
0
 protected virtual bool CanAttack()
 {
     return(!MainLevel.Instance.IsPause() && Time.time - MainLevel.Instance.m_LastUnpauseTime >= 0.25f && !this.m_Player.GetRotationBlocked() && !Inventory3DManager.Get().gameObject.activeSelf&& !HitReactionController.Get().IsActive() && !base.IsBlock() && !this.IsAttack() && !this.m_Player.m_Aim && !ScenarioManager.Get().IsBoolVariableTrue("PlayerMechGameEnding") && !HUDSelectDialog.Get().enabled);
 }
コード例 #8
0
 protected override bool CanAttack()
 {
     return(!MainLevel.Instance.IsPause() && Time.time - MainLevel.Instance.m_LastUnpauseTime >= 0.35f && !this.m_Player.GetRotationBlocked() && !Inventory3DManager.Get().gameObject.activeSelf&& !HitReactionController.Get().IsActive() && !base.IsBlock() && !this.IsAttack() && !HUDSelectDialog.Get().enabled&& !HUDSelectDialogNode.Get().enabled&& Time.time - HUDSelectDialog.Get().m_LastSelectDialogTime >= 0.35f && Time.time - HUDSelectDialogNode.Get().m_LastSelectNodeTime >= 0.35f);
 }