Trap active Test 1

This commit is contained in:
AliIbnAbiTalib
2023-04-06 23:16:05 +02:00
parent 840bc3b7a5
commit ef09b2770b
3 changed files with 12 additions and 10 deletions
@@ -169,16 +169,18 @@ public class NoPlayablePlayer : Player
//Der Spieler steht gerade
else
{
/*
if (currentField.placedItem != null)
if (currentField != null)
{
Trap t = currentField.placedItem.GetComponent<Trap>();
AddCoins(-3);
t.target.AddCoins(3);
Destroy(t);
currentField.placedItem = null;
if (currentField.placedItem != null)
{
Trap t = currentField.placedItem.GetComponent<Trap>();
AddCoins(-3);
t.target.AddCoins(3);
Destroy(t);
currentField.placedItem = null;
}
}
*/
Vector3 currentRotation = Quaternion.ToEulerAngles(transform.rotation);
currentRotation.y = -34;
transform.rotation = Quaternion.Euler(currentRotation);
@@ -106,7 +106,7 @@ public class PlayablePlayer : Player
jumpRequest = true;
wurfelt = true;
wurfelZahl = Random.Range(1, 7);
wurfelZahl = Random.Range(3, 4);
switch (activeItem)
{