Net.Project.B/Src/SpotterScope/ISnapshotService.cs

29 lines
833 B
C#
Raw Normal View History

2025-02-24 23:02:49 +08:00
using System;
using System.Collections;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using MemoryPack;
using Unity.Mathematics;
namespace Net.Project.B.World
{
[MemoryPackable]
2025-04-14 15:39:24 +08:00
public partial record SnapshotData
2025-02-24 23:02:49 +08:00
{
public string FileName { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public DateTime CreateTime { get; set; }
public float3 Position { get; set; }
public quaternion Rotation { get; set; }
}
2025-04-14 15:39:24 +08:00
public interface ISnapshotService
2025-02-24 23:02:49 +08:00
{
public string Directory { get; }
2025-04-14 15:39:24 +08:00
public UniTask<SnapshotData> Snapshot(float3 position, quaternion rotation, int fov);
UniTask<IReadOnlyList<SnapshotData>> GetSnapshots();
public event Action<SnapshotData> OnSnapshot;
2025-02-24 23:02:49 +08:00
}
}