Game.Rendering.CameraBlend
Assembly: Assembly-CSharp
Namespace: Game.Rendering
Type: public enum CameraBlend
Base: System.Enum
Summary:
Defines the possible camera blend states used by the rendering/camera system to indicate transitions between the gameplay camera and a cinematic camera. Typical uses include cutscenes, camera shortcuts, or scripted camera sequences where the game must know whether it is currently blending into a cinematic view, returning to gameplay, or in a neutral state. Mods can read this enum to react to or drive camera transitions.
Fields
-
None
Represents no active camera blend. The camera is in its normal (non-blending) state. -
Unknown
A placeholder or indeterminate state. Used when the blend direction/state is not yet determined or is in an intermediate state. -
ToCinematicCamera
Indicates an active blend from the gameplay camera toward the cinematic camera (entering a cinematic view). -
FromCinematicCamera
Indicates an active blend from the cinematic camera back to the gameplay camera (exiting the cinematic view).
Properties
- (None)
This enum does not declare instance properties. It uses the standard System.Enum behavior (e.g., ToString(), GetHashCode()).
Constructors
- (None)
Enums do not define constructors in user code. Values are assigned as constant underlying integral values by the compiler.
Methods
- (None declared)
No methods are declared on this enum type. Standard System.Enum methods are available (ToString(), HasFlag(), etc.).
Usage Example
using Game.Rendering;
public class CameraController
{
private CameraBlend currentBlend = CameraBlend.None;
public void StartCinematic()
{
currentBlend = CameraBlend.ToCinematicCamera;
// Trigger blend animation/logic here...
}
public void EndCinematic()
{
currentBlend = CameraBlend.FromCinematicCamera;
// Trigger transition back to gameplay camera...
}
public void Update()
{
switch (currentBlend)
{
case CameraBlend.ToCinematicCamera:
// update blending progress into cinematic camera
break;
case CameraBlend.FromCinematicCamera:
// update blending progress back to gameplay camera
break;
case CameraBlend.Unknown:
// handle unexpected state or initialize transition
break;
case CameraBlend.None:
default:
// normal camera behavior
break;
}
}
}
{{ This enum is lightweight and safe for mods to reference. When integrating with the game's camera systems, prefer to use existing camera manager APIs that produce or consume this enum rather than driving low-level camera transforms directly. If you observe the Unknown state during transitions, add defensive handling to avoid abrupt camera jumps. }}