mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-13 18:15:53 +00:00
3D Switches
This commit is contained in:
parent
003dde1b7f
commit
cb60226ced
20 changed files with 267 additions and 14 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue