Class Movement2DBehaviour
- Namespace
- CodeBase.CameraSystem.Core
- Assembly
- 4Experience.CodeBase.CameraSystem.Runtime.dll
[Serializable]
public class Movement2DBehaviour
- Inheritance
-
Movement2DBehaviour
- Extension Methods
-
Properties
CachedDragValue
private bool CachedDragValue { get; set; }
Property Value
- bool
CachedMoveDirection
private Vector2 CachedMoveDirection { get; set; }
Property Value
- Vector2
CachedZoomValue
private float CachedZoomValue { get; set; }
Property Value
- float
private CameraSystemInput CameraInput { get; set; }
Property Value
- CameraSystemInput
CurrentMousePosition
private Vector2 CurrentMousePosition { get; set; }
Property Value
- Vector2
DeadZoneConstraints
private DeadZoneConstraints DeadZoneConstraints { get; set; }
Property Value
- DeadZoneConstraints
DragSpeed
private float DragSpeed { get; set; }
Property Value
- float
EnableMovementOnXAxis
private bool EnableMovementOnXAxis { get; set; }
Property Value
- bool
EnableMovementOnYAxis
private bool EnableMovementOnYAxis { get; set; }
Property Value
- bool
HorizontalRotation
private float HorizontalRotation { get; set; }
Property Value
- float
IsBehaviourEnabled
private bool IsBehaviourEnabled { get; set; }
Property Value
- bool
IsCameraCorrectlyInitialized
private bool IsCameraCorrectlyInitialized { get; set; }
Property Value
- bool
IsFollowingTarget
private bool IsFollowingTarget { get; set; }
Property Value
- bool
IsMovementByDraggingScreenEnabled
private bool IsMovementByDraggingScreenEnabled { get; set; }
Property Value
- bool
IsMovementWithKeysEnabled
private bool IsMovementWithKeysEnabled { get; set; }
Property Value
- bool
IsMovementWithMouseEnabled
private bool IsMovementWithMouseEnabled { get; set; }
Property Value
- bool
MousePositionInLastFrame
private Vector2 MousePositionInLastFrame { get; set; }
Property Value
- Vector2
MoveAreaSize
private float MoveAreaSize { get; set; }
Property Value
- float
SpeedOfMovementUsingKeys
private float SpeedOfMovementUsingKeys { get; set; }
Property Value
- float
SpeedOfMovementUsingMouse
private float SpeedOfMovementUsingMouse { get; set; }
Property Value
- float
Target
private Transform Target { get; set; }
Property Value
- Transform
VerticalRotation
private float VerticalRotation { get; set; }
Property Value
- float
VirtualCamera
private CinemachineVirtualCamera VirtualCamera { get; set; }
Property Value
- CinemachineVirtualCamera
ZoomInMaximumValue
private float ZoomInMaximumValue { get; set; }
Property Value
- float
ZoomOutMaximumValue
private float ZoomOutMaximumValue { get; set; }
Property Value
- float
ZoomSpeed
private float ZoomSpeed { get; set; }
Property Value
- float
Methods
CalculateMovementDestination(Vector3, Vector2, float)
private Vector3 CalculateMovementDestination(Vector3 startPosition, Vector2 direction, float speed)
Parameters
startPosition Vector3
direction Vector2
speed float
Returns
- Vector3
CalculateMovementDirection(Vector2)
private Vector3 CalculateMovementDirection(Vector2 inputValue)
Parameters
inputValue Vector2
Returns
- Vector3
ChangeHorizontalCameraRotation(float)
public void ChangeHorizontalCameraRotation(float horizontalRotation)
Parameters
horizontalRotation float
ChangeVerticalCameraRotation(float)
public void ChangeVerticalCameraRotation(float verticalRotation)
Parameters
verticalRotation float
ClampDestination(Vector3)
private Vector3 ClampDestination(Vector3 destination)
Parameters
destination Vector3
Returns
- Vector3
ControlCameraMovement()
public void ControlCameraMovement()
CorrectMovementDirection(Vector2)
private Vector2 CorrectMovementDirection(Vector2 direction)
Parameters
direction Vector2
Returns
- Vector2
public void DisableInputActions()
DisableOtherMovementThanKeys()
private void DisableOtherMovementThanKeys()
DisableOtherMovementThanMouse()
private void DisableOtherMovementThanMouse()
DisableOtherMovementThanScreenDrag()
private void DisableOtherMovementThanScreenDrag()
public void EnableInputActions()
GetPanDirection(float, float)
private Vector2 GetPanDirection(float mousePositionOnX, float mousePositionOnY)
Parameters
mousePositionOnX float
mousePositionOnY float
Returns
- Vector2
GetPositionOfMoveArea(float, float, ScreenSide)
private float GetPositionOfMoveArea(float screenSize, float moveAreaSize, Movement2DBehaviour.ScreenSide screenSide)
Parameters
screenSize float
moveAreaSize float
screenSide Movement2DBehaviour.ScreenSide
Returns
- float
public void Initialize(CameraSystemInput cameraInput)
Parameters
cameraInput CameraSystemInput
SetCameraRotation()
private void SetCameraRotation()
public void SetCameraTarget(Transform target)
Parameters
target Transform
SetDefaultValueForCurrentMousePosition()
private void SetDefaultValueForCurrentMousePosition()
SetMousePositionInLastFrame()
public void SetMousePositionInLastFrame()
ToggleMovementByDraggingScreen()
public void ToggleMovementByDraggingScreen()
ToggleMovementByFollowingTarget()
public void ToggleMovementByFollowingTarget()
ToggleMovementWithKeys()
public void ToggleMovementWithKeys()
ToggleMovementWithMouse()
public void ToggleMovementWithMouse()
TryDragCamera()
private void TryDragCamera()
TryMoveCamera()
private void TryMoveCamera()
TryPanScreen()
private void TryPanScreen()
TryZoomScreen()
private void TryZoomScreen()
UpdateCameraTarget()
private void UpdateCameraTarget()
UpdateSettings()
public void UpdateSettings()