public override void OnSetHandler() { initialPoint = MoveMarkerManager.CurrentMarkerPositionOnCamera(); initialPoint.z = 0; currentPoint = PlayerController.LastInputPosition; MoveMarkerManager.ClearRotationVisualizer(); }
void Awake() { if (instance == null) { instance = this; nullMoveMarker = (new GameObject("NullMoveMarker").AddComponent <NullMoveMarker>()); nullMoveMarker.transform.SetParent(this.transform); currentMarker = nullMoveMarker; moveMarkers = new List <MoveMarker>(); } else { Destroy(this.gameObject); Debug.LogError("Destroyed duplicate instance of MoveMarkerManager"); } }
public override void OnPlayerInput() { if (MoveMarkerManager.CurrentMarker != this) { MoveMarkerManager.SetCurrentMarker(this); } else { if (MoveMarkerMenu.Instance.Open) { PlayerController.Instance.Moving = true; MoveMarkerMenu.Instance.HideMenu(); this.StartSafeCoroutine(SmoothFadeBoat(false, .25f)); } else { this.StartSafeCoroutine(MoveMarkerMenu.Instance.ShowMenu(transform.position)); } } }
bool SetRotation() { MoveMarkerManager.SetTargetRotation(initialPoint, currentPoint); MoveMarkerManager.IndicateRotationMoveSet(); return(releasesControlOnAction); }
public override void HandleDragInput() { currentPoint = PlayerController.LastInputPosition; MoveMarkerManager.SetTargetRotation(initialPoint, currentPoint); }
bool SetFiringTrajectory() { MoveMarkerManager.IndicateFiringMoveSet(); MoveMarkerManager.SetTargetFiringStrength(GetShotVector()); return(releasesControlOnAction); }
public override void HandleDragInput() { currentPoint = PlayerController.LastInputPosition; MoveMarkerManager.SetTargetFiringStrength(GetShotVector()); }
void Awake() { if (instance == null){ instance = this; nullMoveMarker = (new GameObject("NullMoveMarker").AddComponent<NullMoveMarker>()); nullMoveMarker.transform.SetParent(this.transform); currentMarker = nullMoveMarker; moveMarkers = new List<MoveMarker>(); } else { Destroy(this.gameObject); Debug.LogError("Destroyed duplicate instance of MoveMarkerManager"); } }