diff --git a/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml b/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml index 9dd6760..b14ca7c 100644 --- a/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml +++ b/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml @@ -152,7 +152,7 @@ - + diff --git a/FlufflParty/Assets/Scripts/Players/NoPlayablePlayer.cs b/FlufflParty/Assets/Scripts/Players/NoPlayablePlayer.cs index 9e231d7..79744f1 100644 --- a/FlufflParty/Assets/Scripts/Players/NoPlayablePlayer.cs +++ b/FlufflParty/Assets/Scripts/Players/NoPlayablePlayer.cs @@ -169,6 +169,7 @@ public class NoPlayablePlayer : Player //Der Spieler steht gerade else { + /* if (currentField.placedItem != null) { Trap t = currentField.placedItem.GetComponent(); @@ -177,6 +178,7 @@ public class NoPlayablePlayer : Player Destroy(t); currentField.placedItem = null; } + */ Vector3 currentRotation = Quaternion.ToEulerAngles(transform.rotation); currentRotation.y = -34; transform.rotation = Quaternion.Euler(currentRotation); diff --git a/FlufflParty/Assets/Scripts/Players/PlayablePlayer.cs b/FlufflParty/Assets/Scripts/Players/PlayablePlayer.cs index 686d3fe..3194613 100644 --- a/FlufflParty/Assets/Scripts/Players/PlayablePlayer.cs +++ b/FlufflParty/Assets/Scripts/Players/PlayablePlayer.cs @@ -172,13 +172,16 @@ public class PlayablePlayer : Player //Der Spieler steht gerade else { - if (currentField.placedItem != null) + if (currentField != null) { - Trap t = currentField.placedItem.GetComponent(); - AddCoins(-3); - t.target.AddCoins(3); - Destroy(t); - currentField.placedItem = null; + if (currentField.placedItem != null) + { + Trap t = currentField.placedItem.GetComponent(); + AddCoins(-3); + t.target.AddCoins(3); + Destroy(t); + currentField.placedItem = null; + } } Vector3 currentRotation = Quaternion.ToEulerAngles(transform.rotation); currentRotation.y = -34;