init: add project

This commit is contained in:
Bragin Stepan
2026-02-18 23:02:28 +05:00
commit 4f01e66894
620 changed files with 52253 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using System.Collections.Generic;
using UnityEngine;
namespace _Project.Develop.Runtime.Entities
{
public class CollidersRegistryService
{
private readonly Dictionary<Collider, Entity> _colliderToEntity = new();
public void Register(Collider collider, Entity entity)
{
_colliderToEntity.Add(collider, entity);
}
public void Unregister(Collider collider)
{
_colliderToEntity.Remove(collider);
}
public Entity GetBy(Collider collider)
{
if (_colliderToEntity.TryGetValue(collider, out Entity entity))
return entity;
return null;
}
}
}