Exemplo 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();
            }
        }
Exemplo 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;
        }
Exemplo n.º 3
0
        public override bool ComputeFinishedConditions()
        {
            bool ended = this.Target_FireInteractiveObject_AndWait_ActionDefintion.ManuallyTriggerExitFunction.Invoke();

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

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