public Hill(hills hillName, int kPoint) { HillName = hillName; KPoint = kPoint; if (kPoint <= 80) { HillType = hillType.small; } else if (kPoint < 100) { HillType = hillType.medium; } else if (kPoint <= 170) { HillType = hillType.large; } else if (kPoint > 170) { HillType = hillType.mamut; } HillRecord = PlayerPrefs.GetFloat(HillName.ToString()); RecordPoint = new Vector2(PlayerPrefs.GetFloat(HillName.ToString() + "X", -400), PlayerPrefs.GetFloat(HillName.ToString() + "Y", -400)); }
public void StartHotSeat(hills hill) { if (ActualCompetition != null) { Debug.Log("Competition is already started!"); return; } ActualCompetition = Instantiate(HotSeatCompetitionPrefab).GetComponent <CompetitionManager>(); if (ActualCompetition == null) { Debug.LogError("GameManager cannot acces Competition manager in Hot Seat Competition Prefab!"); } if (ActualCompetition != null) { ActualCompetition.transform.parent = this.transform; } CurrentHill = Hills.Find(_hill => _hill.HillName.Equals(hill)); SceneManager.LoadScene(CurrentHill.HillName.ToString()); }