void Move() { Vector3 position = Vector3.zero; if (direction == Direction.UP) { Dado bodyToMove = tail.Dequeue(); bodyToMove.pixel.transform.position = tail.last.dado.pixel.transform.position + Vector3.up * 0.16f; tail.Enqueue(bodyToMove); } else if (direction == Direction.DOWN) { Dado bodyToMove = tail.Dequeue(); bodyToMove.pixel.transform.position = tail.last.dado.pixel.transform.position + Vector3.down * 0.16f; tail.Enqueue(bodyToMove); } else if (direction == Direction.LEFT) { Dado bodyToMove = tail.Dequeue(); bodyToMove.pixel.transform.position = tail.last.dado.pixel.transform.position + Vector3.left * 0.16f; tail.Enqueue(bodyToMove); } else if (direction == Direction.RIGHT) { Dado bodyToMove = tail.Dequeue(); bodyToMove.pixel.transform.position = tail.last.dado.pixel.transform.position + Vector3.right * 0.16f; tail.Enqueue(bodyToMove); } }
public Programa Avancar() { if (Fila.Any()) { return(Fila.Dequeue()); } else { return(null); } }
public async Task Remover(CommandContext ctx, VoiceNextConnection vnc) { if (Fila.Count == 0) { await vnc.SendSpeakingAsync(false); vnc?.Disconnect(); StatusDaFila = EnumeradorDeStatusDaFila.Parada; } else { var proximaExecucao = Fila.Dequeue(); await AoExecutarMusica?.Invoke(proximaExecucao); } }