Prozentuale Coins Trap (10%)

This commit is contained in:
brausjonas
2023-04-10 14:36:00 +02:00
parent 9cbd019f2f
commit 106535cb19
3 changed files with 19 additions and 18 deletions
@@ -177,8 +177,9 @@ public class NoPlayablePlayer : Player
if(t.target.index != index)
{
AddCoins(-3);
t.target.AddCoins(3);
int coinsAmount = (int)(coins * 0.1f);
AddCoins(-coinsAmount);
t.target.AddCoins(coinsAmount);
currentField.placedItem = null;
Destroy(t.gameObject);
}
@@ -180,9 +180,9 @@ public class PlayablePlayer : Player
if(t.target.index != index)
{
AddCoins(-3);
Debug.Log(t.name);
t.target.AddCoins(3);
int coinsAmount = (int)(coins * 0.1f);
AddCoins(-coinsAmount);
t.target.AddCoins(coinsAmount);
currentField.placedItem = null;
Destroy(t.gameObject);
}