GameHandler.GameOver C# (CSharp) Method

GameOver() public static method

public static GameOver ( ) : void
return void
    public static void GameOver()
    {
        if("" != DataHolder.GameSettings().gameOver.scene)
        {
            GameHandler.GetLevelHandler().interactionList = new ArrayList();
            GameHandler.Party().DestroyInstances();
            Application.LoadLevel(DataHolder.GameSettings().gameOver.scene);
            DataHolder.Instance();
            DataHolder.GameSettings().LoadResources();
            DataHolder.LoadSaveHUD().LoadResources();
            DataHolder.MainMenu().LoadResources();
            DataHolder.BattleSystemData().LoadResources();
            GameHandler.Instance();
            GameHandler.ChangeHappened(2, 0, 0);
        }
        GameHandler.GetLevelHandler().CallGameOverChoice();
    }

Usage Example

Example #1
0
 void OnMouseDown()
 {
     if (gameHandler.isGameActive)
     {
         Destroy(gameObject);
         gameHandler.UpdateScore(pointValue);
         Instantiate(explosionParticle, transform.position, explosionParticle.transform.rotation);
         if (this.CompareTag("Bad_Object"))
         {
             gameHandler.GameOver();
         }
     }
 }
All Usage Examples Of GameHandler::GameOver
GameHandler