void VerifColorPlayer(BackGroundColorState color, PlayerBehaviour player, bool firstTime) { if (ColorStates == color) { VerifTiming(firstTime, player); } else { if (GameManager.GameStates == GameManager.GameState.InGame) { time += Time.deltaTime; if (time > LevelManager.instance.timingGood) { time = 0; --player.life; player.AnimationScore("miss"); LevelManager.instance.addScore(LevelManager.instance.scoreMiss); } } } }
public void ChangeBKColorState(BackGroundColorState colorState) { _colorState = colorState; switch (_colorState) { case BackGroundColorState.White: ChangeBackGroundColor(0); break; case BackGroundColorState.Green: ChangeBackGroundColor(1); break; case BackGroundColorState.Red: ChangeBackGroundColor(2); break; case BackGroundColorState.Blue: ChangeBackGroundColor(3); break; case BackGroundColorState.Pink: ChangeBackGroundColor(4); break; case BackGroundColorState.Purple: ChangeBackGroundColor(5); break; case BackGroundColorState.Yellow: ChangeBackGroundColor(6); break; case BackGroundColorState.Cyan: ChangeBackGroundColor(7); break; } }