Example #1
0
 // Versucht aus dem Kampf zu fliehen
 private void tryEscape()
 {
     if (isPlayersTurn)
     {
         float escape = Random.Range(0.0f, 1.0f);
         Debug.Log(escape);
         if (player.getEscapeChance() < escape)
         {
             showText(playerCombat.transform.position, "Fehlgeschlagen!", Color.white);
             Debug.Log("Failed to escape!");
             endTurn();
         }
         else
         {
             HPPanel.SetActive(true);
             Debug.Log("Escape successful!");
             Destroy(enemyCombat.gameObject);
             playerCamera.SetActive(true);
             battleCamera.SetActive(false);
             setInCombat(false);
         }
     }
 }