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(); } }
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; }
public override bool ComputeFinishedConditions() { bool ended = this.Target_FireInteractiveObject_AndWait_ActionDefintion.ManuallyTriggerExitFunction.Invoke(); if (ended) { TargetAndFireTestUtil.SetupInputForStoppingFiring(); } return(ended); }