day transition is now working
This commit is contained in:
parent
a53857c4d2
commit
7b286bcfd9
13 changed files with 390 additions and 388 deletions
|
|
@ -31,8 +31,9 @@ public class PlayerController : MonoBehaviour {
|
|||
public int Money => _money;
|
||||
|
||||
public delegate void OnMoneyChanged();
|
||||
|
||||
public OnMoneyChanged onMoneyChangedCallback;
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
private void Start() {
|
||||
_inventory = Inventory.instance;
|
||||
|
|
@ -51,8 +52,7 @@ public class PlayerController : MonoBehaviour {
|
|||
}
|
||||
}
|
||||
|
||||
public void DeselectItem()
|
||||
{
|
||||
public void DeselectItem() {
|
||||
_selectedItem = null;
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
}
|
||||
|
|
@ -63,11 +63,11 @@ public class PlayerController : MonoBehaviour {
|
|||
|
||||
public void ChangeMoney(int amount) {
|
||||
_money += amount;
|
||||
|
||||
|
||||
onMoneyChangedCallback?.Invoke();
|
||||
}
|
||||
|
||||
private void UpdateMoneyUI() {
|
||||
moneyTextMeshProUGUI.text = _money + "µ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue