void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } uiManager = GetComponent <UIManager>(); pud = GetComponent <PowerUpDroppable>(); dp = GetComponent <DifficultyProgression>(); uiManager.SetTimer(levelTime); surviveTimeLeft = levelTime; portalTimeLeft = portalTime; totalEnemyKills = PlayerPrefs.GetInt("Credits"); currentShip = PlayerPrefs.GetInt("PlayerShip"); currentShipColor = PlayerPrefs.GetInt("ShipColor"); player = SpawnPlayer(); }
public static void EnemyKill() { totalKills++; if (DifficultyProgression.CheckLevelUp(level, levelKills)) { DifficultyProgression.LevelUp(); levelKills = 0; } else { levelKills++; } }