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

25 lines
548 B
C#

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
{
public virtual VirtualCamera3DSlot GetCameraSlot()
{
return VirtualCamera3DManager.Get().activeSlot;
}
protected override void _OnTrigger()
{
VirtualCamera3DManager.Get().SetActiveSlot( GetCameraSlot() );
}
}
}