// ╔════════════════════════════════════════════════════════════════╗ // ║ Copyright © 2025 NWH Coding d.o.o. All rights reserved. ║ // ║ Licensed under Unity Asset Store Terms of Service: ║ // ║ https://unity.com/legal/as-terms ║ // ║ Use permitted only in compliance with the License. ║ // ║ Distributed "AS IS", without warranty of any kind. ║ // ╚════════════════════════════════════════════════════════════════╝ #region using UnityEngine; #endregion namespace NWH.Common.Input { /// /// InputProvider for scene and camera related behavior. /// public abstract class SceneInputProviderBase : InputProvider { /// /// If true a button press will be required to unlock camera panning. /// [Tooltip(" If true a button press will be required to unlock camera panning.")] public bool requireCameraPanningModifier = true; /// /// If true a button press will be required to unlock camera rotation. /// [Tooltip(" If true a button press will be required to unlock camera rotation.")] public bool requireCameraRotationModifier = true; /// /// Returns true when the change camera button is pressed. /// public virtual bool ChangeCamera() { return false; } /// /// Returns camera rotation input as a Vector2 (x = horizontal, y = vertical). /// public virtual Vector2 CameraRotation() { return Vector2.zero; } /// /// Returns camera panning input as a Vector2 (x = horizontal, y = vertical). /// public virtual Vector2 CameraPanning() { return Vector2.zero; } /// /// Returns true when the camera rotation modifier button is held. /// If requireCameraRotationModifier is false, always returns true. /// public virtual bool CameraRotationModifier() { return !requireCameraRotationModifier; } /// /// Returns true when the camera panning modifier button is held. /// If requireCameraPanningModifier is false, always returns true. /// public virtual bool CameraPanningModifier() { return !requireCameraPanningModifier; } /// /// Returns camera zoom input value. Positive = zoom in, negative = zoom out. /// public virtual float CameraZoom() { return 0; } /// /// Returns true when the change vehicle button is pressed. /// public virtual bool ChangeVehicle() { return false; } /// /// Returns character movement input as a Vector2 (x = horizontal, y = forward/back). /// public virtual Vector2 CharacterMovement() { return Vector2.zero; } /// /// Returns true when the toggle GUI button is pressed. /// public virtual bool ToggleGUI() { return false; } } }