Ejemplo n.º 1
0
    public void explode()
    {
        try{
            GameObject explosionPrefab = playerSpritesManager.GetExplosionPrefab();
            GameObject explosao_effect = Instantiate(explosionPrefab, transform.position, Quaternion.identity);
            Destroy(gameObject);
            updatePlayerStatus();

            if (!playerStatus.isGameOver())
            {
                //Debug.LogWarning("CHANCWS " + PlayerGlobalStatus.getPlayerChances());
                level.waitBeforeTryAgain(tryAgainDelay);
            }
            else
            {
                playerStatus.gameOverTrigger();
            }
        }catch (System.Exception e) {
            Debug.LogWarning(e);
        }
    }