Esempio n. 1
0
        public override void Tick(float d)
        {
            if (!this.target.IsAskingToBeDestroyed)
            {
                TargetCursorManager.Get().SetTargetCursorPosition(Camera.main.WorldToScreenPoint(
                                                                      this.target.InteractiveGameObject.GetLocalToWorld().MultiplyPoint(this.target.GetFiringTargetLocalPosition())));
            }

            if (this.firingInteractiveObject.GetCurrentlyTargettedInteractiveObject() != target)
            {
                GameTestMockedInputManager.MockedInstance.GetGameTestMockedXInput().GameTestInputMockedValues.SwitchSelectionButtonD = true;
            }
            else
            {
                GameTestMockedInputManager.MockedInstance.GetGameTestMockedXInput().GameTestInputMockedValues.SwitchSelectionButtonD = false;
            }

            this.TargetIsCorrect = (this.firingInteractiveObject.GetCurrentlyTargettedInteractiveObject() == target);

            if (this.target.IsAskingToBeDestroyed)
            {
                this.TargetIsCorrect = true;
            }

            if (this.TargetIsCorrect)
            {
                TargetAndFireTestUtil.SetupInputForStoppingFiring();
            }
        }
Esempio n. 2
0
        private IEnumerator ActionCoroutine()
        {
            TargetAndFireTestUtil.SetupInputForStartingFiring();
            TargetCursorManager.Get().SetTargetCursorPosition(Camera.main.WorldToScreenPoint(
                                                                  this.Target.InteractiveGameObject.GetLocalToWorld().MultiplyPoint(this.Target.InteractiveGameObject.AverageModelLocalBounds.Bounds.center)));
            yield return(null);

            TargetAndFireTestUtil.SetupInputForStoppingFiring();
            this.ended = true;
        }
Esempio n. 3
0
        public override bool ComputeFinishedConditions()
        {
            bool ended = this.Target_FireInteractiveObject_AndWait_ActionDefintion.ManuallyTriggerExitFunction.Invoke();

            if (ended)
            {
                TargetAndFireTestUtil.SetupInputForStoppingFiring();
            }

            return(ended);
        }
Esempio n. 4
0
 public override void FirstExecutionAction()
 {
     TargetAndFireTestUtil.SetupInputForStartAiming();
 }
Esempio n. 5
0
 public override void FirstExecutionAction()
 {
     TargetAndFireTestUtil.SetupInputForStartingFiring();
     this.Tick(0f);
 }