Files
ss14-wl/Content.Client/_WL/Photo/PhotoSystem.cs
MishaUnity da90a40df5 Фотоаппараты (#329)
* Сущности на сканере масс

* Первый прогресс

* Базовая система

* Небольшие фиксы

* Небольшие фиксы
2025-10-21 17:52:44 +03:00

41 lines
992 B
C#

using Content.Client._WL.Photo.UI;
using Content.Shared._WL.Photo;
namespace Content.Client._WL.Photo;
public sealed partial class PhotoSystem : SharedPhotoSystem
{
public Dictionary<PhotoCameraComponent, PhotoCameraBoundUserInterface> ActiveCameras = new();
public override void Initialize()
{
base.Initialize();
}
public override void Update(float frameTime)
{
base.Update(frameTime);
foreach (var (component, window) in ActiveCameras)
{
window.UpdateControl(component, frameTime);
}
}
public void OpenCameraUi(PhotoCameraComponent component, PhotoCameraBoundUserInterface window)
{
if (ActiveCameras.ContainsKey(component))
return;
ActiveCameras.Add(component, window);
}
public void CloseCameraUi(PhotoCameraComponent component)
{
if (!ActiveCameras.ContainsKey(component))
return;
ActiveCameras.Remove(component);
}
}