Пример #1
0
 void HitBoxHit(int carriedAnswer)      //Pass weakspotnya hit --> do something
 {
     Instantiate(hitbyprojectile);
     if (soalManager.angkaJawab == carriedAnswer)
     {
         statManager.tambahScore();
         soalManager.callBuatSoal();
         nyawaBoss--;
         statManager.refreshUInyawaBoss(nyawaBoss);
         RegenJawaban();
         if (nyawaBoss <= 0)
         {
             statManager.tambahScore(carriedScore);
             statManager.enableUInyawaBoss(false);
             if (endlessModeBoss)
             {
                 spawnManager.changeBossTimeState();
             }
             else
             {
                 statManager.loadNextLevel();                      //load level selanjutnya
             }
             Destroy(this.gameObject);
         }
     }
     else
     {
         statManager.kurangScore();
         soalManager.callBuatSoal();
         RegenJawaban();
     }
 }
Пример #2
0
    void Update()
    {
        if (!spawnerScript.bossSpawned && score >= scoreTreshold)
        {
            spawnerScript.changeBossTimeState();
            scoreTreshold += scoreScaling;
        }

        if (nyawa <= 0)
        {
            Debug.Log("GameOver");
            sceneScript.passed_score = score;
            sceneScript.loadGameOver();              //pas mati
        }
    }