Project structure, add docs update unity version

This commit is contained in:
2026-06-05 12:19:36 +03:00
parent fc24653f9a
commit 39294ec527
87 changed files with 5910 additions and 371 deletions
+27
View File
@@ -0,0 +1,27 @@
public class PlayerState : MonoBehaviour
{
public int Lives = 3;
public int TotalCoins { get; private set; }
public bool HasKey { get; private set; }
public event EventHandler<TreasureType> OnPlayerTakeItem;
public void AddCoin()
{
TotalCoins++;
OnPlayerTakeItem?.Invoke(this, TreasureType.Coin);
Debug.Log($"Player has {TotalCoins} coins");
}
public void SetKey()
{
HasKey = true;
OnPlayerTakeItem?.Invoke(this, TreasureType.Key);
Debug.Log("Player has key");
}
public void RemoveKey()
{
HasKey = false;
}
}