Exemplo n.º 1
0
    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();
    }
Exemplo n.º 2
0
 public static void EnemyKill()
 {
     totalKills++;
     if (DifficultyProgression.CheckLevelUp(level, levelKills))
     {
         DifficultyProgression.LevelUp();
         levelKills = 0;
     }
     else
     {
         levelKills++;
     }
 }