diff options
Diffstat (limited to 'td/Assets/Scripts/player.cs')
-rw-r--r-- | td/Assets/Scripts/player.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/td/Assets/Scripts/player.cs b/td/Assets/Scripts/player.cs index cb55357..608d09c 100644 --- a/td/Assets/Scripts/player.cs +++ b/td/Assets/Scripts/player.cs @@ -9,6 +9,7 @@ public class Player : MonoBehaviour { private int _gameState; private GameObject[] _towers; private int _playerMoney; + private int _playerPaycheck; private int _playerScore; private int _playerHealth; @@ -41,6 +42,19 @@ public class Player : MonoBehaviour { _playerMoney -= sum; } + public int Paycheck() { + return _playerPaycheck; + } + + public void PaycheckAdd(int sum) { + _playerPaycheck += sum; + } + + public void Payday() { + _playerMoney += _playerPaycheck; + _playerPaycheck = 0; + } + public int Health() { return _playerHealth; } |