void GetStatMonitor() { if (hasStatMonitor == true) { return; } if (source == null) { // Get a source source = FindObjectsOfType <HealthMonitor>().First(t => t.tag == Globals.TAGS.Player); if (source == null) { // Thats bad! return; } if (Use_Stat_Number == 3) { // Use a debug mode which used SIN() max = 1; } else { max = source.GetLimitAtIndex(Use_Stat_Number); } } else { hasStatMonitor = true; } }
void GetStatMonitor() { if (hasStatMonitor == true) { return; } if (source == null) { // Get a source source = FindObjectsOfType<HealthMonitor>().First(t => t.tag == Globals.TAGS.Player); if (source == null) { // Thats bad! return; } if (Use_Stat_Number == 3) { // Use a debug mode which used SIN() max = 1; } else { max = source.GetLimitAtIndex(Use_Stat_Number); } } else { hasStatMonitor = true; } }