public static void SetTimerActivePlayer(ePLAYER _ePlayerActive, float _fTimer) { switch (_ePlayerActive) { case ePLAYER.PLAYER1: fTimerPayer1 = _fTimer; break; case ePLAYER.PLAYER2: fTimerPayer2 = _fTimer; break; default: Debug.LogError("Error. No has pasado el Player Activo. SetTimerActivePlayer()"); break; } }
public static float GetTimerDeactivePlayer(ePLAYER _ePlayerActive) { float fReport = 0; switch (_ePlayerActive) { case ePLAYER.PLAYER1: fReport = fTimerPayer2; break; case ePLAYER.PLAYER2: fReport = fTimerPayer1; break; default: Debug.LogError("Error. No has pasado el Player Activo. GetTimerDeactivePlayer()"); break; } return(fReport); }
/*public static float GetTimeRound() { * float fReport = fTimePerRound; * if (iRoundCounter <= 0) iRoundCounter = 1; * if (iRoundCounter > 0 && iRoundCounter <= fLessTimerPerRound.Length) fReport -= fLessTimerPerRound[iRoundCounter - 1]; * if (iRoundCounter > fLessTimerPerRound.Length) fReport = 0; * return fReport; * * }*/ public static void NextRound() { if (ePlayerActive.Equals(ePLAYER.PLAYER2)) { ePlayerActive = ePLAYER.PLAYER1; iRoundCounter++; } else if (ePlayerActive.Equals(ePLAYER.PLAYER1)) { ePlayerActive = ePLAYER.PLAYER2; } SceneManager.LoadScene("RoundScene"); }
//Gestión de los Jugadores public static void SetPlayer(ePLAYER _ePlayerActive) { ePlayerActive = _ePlayerActive; }