void Awake() { if (s_Instance == null) { s_Instance = this; } //DontDestroyOnLoad(this); m_TimeOfPlay = GetComponent <TimeOfPlay>(); m_DeathCounterGameGreen = 0; m_DestroyCounterGameGreen = 0; m_AssistCounterGameGreen = 0; m_DeathCounterGameOrange = 0; m_DestroyCounterGameOrange = 0; m_AssistCounterGameOrange = 0; m_GreenColonies = 0; m_OrangeColonies = 0; }
void Awake() { if (s_Instance == null) s_Instance = this; //DontDestroyOnLoad(this); m_TimeOfPlay = GetComponent<TimeOfPlay>(); m_DeathCounterGameGreen = 0; m_DestroyCounterGameGreen = 0; m_AssistCounterGameGreen = 0; m_DeathCounterGameOrange = 0; m_DestroyCounterGameOrange = 0; m_AssistCounterGameOrange = 0; m_GreenColonies=0; m_OrangeColonies=0; }
//метод для вызова события Time public void PlayTime() { int time = new Random().Next(1, 97); TimeOfPlay?.Invoke($"Игрок {Surname} в последнем матче провел на поле {time} минут"); }