private PlayerState ToPlayerState(Common.PlayerState state) { switch (state) { case Common.PlayerState.Idle: return(PlayerState.Idle); case Common.PlayerState.Prepared: return(PlayerState.Prepared); case Common.PlayerState.Paused: return(PlayerState.Paused); case Common.PlayerState.Playing: return(PlayerState.Playing); default: throw new ArgumentOutOfRangeException(nameof(state), state, null); } }
private void Update() { if (health.ValorSalud <= 0) { playerState = Common.PlayerState.Muerto; } else { playerState = Common.PlayerState.Jugando; } switch (playerState) { case Common.PlayerState.Jugando: break; case Common.PlayerState.Muerto: break; case Common.PlayerState.EsperandoARevivir: break; } }