void OnDeath(MGPlayer player) { player.transform.position = player.SpawnPoint; player.GetComponent <Attackable> ().DamageObj(-100f); player.Bombs = 3; player.Barrels = 3; player.Blocks = 6; FindObjectOfType <MGUI> ().UpdatePlayerDeath(player.PlayerName); }
void OnFinish(MGPlayer player) { FindObjectOfType <MGUI> ().UpdatePlayerWins(player.PlayerName); List <string> winMessages = new List <string> (); winMessages.Add(player.PlayerName + ", A Winner is You!"); winMessages.Add(player.PlayerName + ", You're Winner!"); winMessages.Add(player.PlayerName + ", You have prooved the Justice of our Culture!"); winMessages.Add(player.PlayerName + ", Congraturations! You sucsess!"); winMessages.Add(player.PlayerName + ", You have completed a Great Game!"); winMessages.Add(player.PlayerName + ", Unbelievably Powerfull you are!"); FindObjectOfType <MGUI> ().SetMessage(winMessages[Random.Range(0, winMessages.Count - 1)], 5f); foreach (MGPlayer p in FindObjectsOfType <MGPlayer>()) { p.transform.position = p.SpawnPoint; p.GetComponent <Attackable> ().DamageObj(-100f); p.Bombs = 3; p.Blocks = 3; p.Barrels = 3; } }