3D Switches

This commit is contained in:
Marco 2025-06-13 17:46:44 +02:00
commit cb60226ced
20 changed files with 267 additions and 14 deletions

View file

@ -6,6 +6,7 @@ namespace Cirno.Scripts.Misc;
public partial class CameraController : Camera2D
{
public static CameraController Instance { get; private set; }
[Export] public bool PixelSnap { get; set; } = true;
[Export] public bool EnableSmoothing { get; set; } = true;
@ -41,6 +42,7 @@ public partial class CameraController : Camera2D
public override void _Ready()
{
Instance = this;
AddToGroup(CameraControllersGroupName);
}

View file

@ -4,6 +4,8 @@ namespace Cirno.Scripts.Misc;
public partial class CameraController3D : Camera3D
{
public static CameraController3D Instance { get; private set; }
[Export] public bool EnableSmoothing = true;
[Export] public bool FollowTargeting = true;
@ -27,6 +29,7 @@ public partial class CameraController3D : Camera3D
public override void _Ready()
{
Instance = this;
_target = GetNode<Node3D>(TargetPath);
if (_target == null)
{