コード例 #1
0
    IEnumerator GameOverEnumerator(Vector2 cameraPos, float[] damageTaken, bool isQuit)
    {
        if (!isQuit)
        {
            Time.timeScale = 0.25f;
            for (float i = 0; i < (float)3 / 4; i += Time.deltaTime)
            {
                if (oneMoreChance)
                {
                    break;
                }
                yield return(null);
            }
        }
        if (oneMoreChance)
        {
            oneMoreChance = false;
        }
        else
        {
            Time.timeScale = 1;
            cameraCont.GameOver();
            starReward = (int)killSum / 5 + (int)currentGameTime / 6;
            gameOver   = true;
            challengeCont.GameOver(isQuit);
            StartCoroutine(spawnCont.GameOver(isQuit));
            healthAbilityOn = false;
            int recordValue = (data.highScoreTime < currentGameTime ? 1 : 0) + (data.highScoreKill < killSum ? 2 : 0);
            dataCont.SetData((int)currentGameTime, killSum, currentEnemiesKilled, damageTaken, recordValue);
            SaveCurrentGameData(damageTaken, isQuit);
            yield return(new WaitForSeconds(0.5f)); //TO avoid lag

            SaveAndLoad.SaveData(data);
        }
    }
コード例 #2
0
    //void FixedUpdate()
    //{

    //}
    void GameOver()
    {
        isGameOver = true;
        myChallenge.GameOver();
        SoundMScript.PlaySound("death");
        animator.SetBool("isDeath", true);
    }
コード例 #3
0
 void GameOver()
 {
     myAudioSource.PlayOneShot(dead);
     isGameOver = true;
     anim.SetBool("death", true);
     myChallengeController.GameOver();
     ls.gover = true;
 }
コード例 #4
0
 void GameOver()
 {
     isGameOver = true;
     myAudioPlayer.PlayOneShot(deadSFX);
     myChallengeController.GameOver();
 }
コード例 #5
0
 void GameOver()
 {
     isGameOver = true;
     myChallengeController.GameOver();
 }
コード例 #6
0
 void GameOver()
 {
     isGameOver = true;
     myAudioPlayer.PlayOneShot(deathSound);
     mychallengeController.GameOver();
 }
コード例 #7
0
 void GameOver()
 {
     isGameOver = true;
     myChallengeController.GameOver();
     GameControl.Restart();
 }
コード例 #8
0
 void GameOver()
 {
     isGameOver = true;
     myChallengeController.GameOver();
     OSCHandler.Instance.SendMessageToClient("pd", "/unity/musicStart", 0);
 }
コード例 #9
0
 void GameOver()
 {
     isGameOver = true;
     myChallengeController.GameOver();
     Debug.Log("Game Over");
 }