feat(app): Phase B.2 — CameraController chase mode
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fe1c949775
commit
e5e1245efb
1 changed files with 16 additions and 0 deletions
|
|
@ -5,8 +5,10 @@ public sealed class CameraController
|
||||||
{
|
{
|
||||||
public OrbitCamera Orbit { get; }
|
public OrbitCamera Orbit { get; }
|
||||||
public FlyCamera Fly { get; }
|
public FlyCamera Fly { get; }
|
||||||
|
public ChaseCamera? Chase { get; private set; }
|
||||||
public ICamera Active { get; private set; }
|
public ICamera Active { get; private set; }
|
||||||
public bool IsFlyMode => Active == Fly;
|
public bool IsFlyMode => Active == Fly;
|
||||||
|
public bool IsChaseMode => Chase is not null && Active == Chase;
|
||||||
|
|
||||||
public event Action<bool>? ModeChanged;
|
public event Action<bool>? ModeChanged;
|
||||||
|
|
||||||
|
|
@ -23,6 +25,20 @@ public sealed class CameraController
|
||||||
ModeChanged?.Invoke(IsFlyMode);
|
ModeChanged?.Invoke(IsFlyMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void EnterChaseMode(ChaseCamera chase)
|
||||||
|
{
|
||||||
|
Chase = chase;
|
||||||
|
Active = chase;
|
||||||
|
ModeChanged?.Invoke(IsChaseMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ExitChaseMode()
|
||||||
|
{
|
||||||
|
Active = Fly;
|
||||||
|
Chase = null;
|
||||||
|
ModeChanged?.Invoke(IsFlyMode);
|
||||||
|
}
|
||||||
|
|
||||||
public void SetAspect(float aspect)
|
public void SetAspect(float aspect)
|
||||||
{
|
{
|
||||||
Orbit.Aspect = aspect;
|
Orbit.Aspect = aspect;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue