using UnityEngine;
namespace Cinemachine
{
///
/// An abstract representation of a virtual camera which lives within the Unity scene
///
public interface ICinemachineCamera
{
///
/// Gets the name of this virtual camera. For use when deciding how to blend
/// to or from this camera
///
string Name { get; }
///
/// Gets a brief debug description of this virtual camera, for use when displayiong debug info
///
string Description { get; }
///
/// Gets the priority of this ICinemachineCamera. The virtual camera
/// will be inserted into the global priority stack based on this value.
///
int Priority { get; set; }
///
/// The thing the camera wants to look at (aim). May be null.
///
Transform LookAt { get; set; }
///
/// The thing the camera wants to follow (moving camera). May be null.
///
Transform Follow { get; set; }
///
/// Camera state at the current time.
///
CameraState State { get; }
///
/// Gets the virtual camera game attached to this class.
///
GameObject VirtualCameraGameObject { get; }
///
/// Will return false if this references a deleted object
///
bool IsValid { get; }
///
/// For cameras that implement child cameras, returns the parent vcam, otherwise null.
///
ICinemachineCamera ParentCamera { get; }
/// Check whether the vcam is a live child of this camera.
/// The Virtual Camera to check
/// If truw, will only return true if this vcam is the dominat live child
/// True if the vcam is currently actively influencing the state of this vcam
bool IsLiveChild(ICinemachineCamera vcam, bool dominantChildOnly = false);
///
/// Update the camera's state.
/// The implementation must guarantee against multiple calls per frame, and should
/// use CinemachineCore.UpdateVirtualCamera(ICinemachineCamera, Vector3, mfloat), which
/// has protection against multiple calls per frame.
///
/// Default world Up, set by the CinemachineBrain
/// Delta time for time-based effects (ignore if less than 0)
void UpdateCameraState(Vector3 worldUp, float deltaTime);
///
/// Updates this Cinemachine Camera. For an active camera this should be
/// called once and only once each frame. To guarantee this, you should never
/// call this method directly. Always use
/// CinemachineCore.UpdateVirtualCamera(ICinemachineCamera, Vector3, float), which
/// has protection against multiple calls per frame.
///
/// Default world Up, set by the CinemachineBrain
/// Delta time for time-based effects (ignore if less than 0)
void InternalUpdateCameraState(Vector3 worldUp, float deltaTime);
///
/// Notification that a new camera is being activated. This is sent to the
/// currently active camera. Both may be active simultaneously for a while, if blending.
///
/// The camera being deactivated. May be null.
/// Default world Up, set by the CinemachineBrain
/// Delta time for time-based effects (ignore if less than 0)
void OnTransitionFromCamera(ICinemachineCamera fromCam, Vector3 worldUp, float deltaTime);
/// This is called to notify the component that a target got warped,
/// so that the component can update its internal state to make the camera
/// also warp seamlessy. Base class implementation does nothing.
/// The object that was warped
/// The amount the target's position changed
void OnTargetObjectWarped(Transform target, Vector3 positionDelta);
}
}