rj-action-library/Runtime/Cameras/CameraSlotSelectors/CameraSlotSelector.cs

25 lines
521 B
C#
Raw Permalink Normal View History

using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using System;
using Godot;
namespace Rokojori
{
[Tool]
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SetActiveVirtualCamera3D.svg") ]
public partial class CameraSlotSelector:Action
{
2025-08-31 06:05:39 +00:00
public virtual CameraSlot GetCameraSlot()
{
2025-08-31 06:05:39 +00:00
return CameraManager.Get().activeSlot;
}
protected override void _OnTrigger()
{
2025-08-31 06:05:39 +00:00
CameraManager.Get().SetActiveSlot( GetCameraSlot() );
}
}
}