public void Add(TeleportEntity teleport) { teleport.SetId(_next_id); if (ResourceEntites.TryAdd(teleport.Id, teleport)) { _next_id++; teleport.SetGridCell(this); EntityCount++; AllEntityCount++; } }
private void InitTeleporter(Vector3 position, float radius, int targetMapIndex) { TeleportEntity teleport = new TeleportEntity(this, targetMapIndex, position, radius); Data.Add(teleport); }
public void Add(TeleportEntity teleport) { GetGridCellByPosition(teleport.Position).Add(teleport); }