// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); gameCount = GetComponent <GameCounts>(); backscript = mainCamera.GetComponent <BackgroundLoop>(); nextLevel = false; sceneManag = actScene.GetComponent <SceneManag>(); }
// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); gameCount = GetComponent <GameCounts>(); gameOver = GetComponent <GameOver>(); backLoop = mainCamera.GetComponent <BackgroundLoop>(); nextLevel = GetComponent <NextLevel>(); sceneManag = actScene.GetComponent <SceneManag>(); }
// public AudioSource audio; // Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); general = GameObject.Find("General_0"); gameCount = general.GetComponent <GameCounts> (); nextLevel = general.GetComponent <NextLevel>(); sceneManag = actScene.GetComponent <SceneManag>(); // bossShots = 0; }
private void CalculGamesAndLocationCounts() { LocationCounts.Clear(); GameCounts.Clear(); NbPlayersCounts.Clear(); foreach (var play in AllPlaysByYear) { AddOrIncrementLocationCounts(LocationCounts, play.Location); AddOrIncrementLocationCounts(GameCounts, play.Game); AddOrIncrementLocationCounts(NbPlayersCounts, play.Result.Count.ToString()); } }
public int GetHIndex() { int counter = 0; foreach (var item in GameCounts.OrderByDescending(p => p.Value)) { if (item.Value > counter) { counter++; } else { break; } } return(counter); }