mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-15 03:31:38 +01:00
* Сущности на сканере масс * Первый прогресс * Базовая система * Небольшие фиксы * Небольшие фиксы
41 lines
992 B
C#
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);
|
|
}
|
|
}
|