void enqueue(FishType type) { var queueObject = Instantiate(QueueObjectPrefab, QueueContainer.transform); queueObject.Initialize(type); IncomingFish.Enqueue(type); }
public void OnPlayerRespawn() { board = CellPositions.ToDictionary <Vector2, Vector2, CargoBlock>(v => v, v => null); columns = CellPositions.GroupBy(v => v.x) .Select(g => g.OrderBy(v => v.y).ToList()) .ToList(); rows = CellPositions.GroupBy(v => v.y) .Select(g => g.OrderBy(v => v.x).ToList()) .ToList(); IncomingFish.Clear(); FishInCargoHold.Clear(); }
FishType dequeue() { Destroy(QueueContainer.transform.GetChild(0).gameObject); return(IncomingFish.Dequeue()); }