rabidus-test/Assets/Scripts/PlayerInfo.cs

32 lines
621 B
C#
Raw Normal View History

2023-08-15 17:38:54 +03:00
using System;
2023-07-24 16:38:13 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class Player
{
public string Name;
2023-08-15 17:38:54 +03:00
public float Score
{
get => _score;
set
{
_score = value;
OnScoreChange?.Invoke(_score);
}
}
private float _score;
2023-07-24 16:38:13 +03:00
public List<MonumentInfo> UnlockedMonumets = new List<MonumentInfo>();
2023-08-15 17:38:54 +03:00
public event Action<float> OnScoreChange;
2023-07-24 16:38:13 +03:00
}
[CreateAssetMenu(fileName = "PlayerInfo")]
public class PlayerInfo : ScriptableObject
{
public List<Player> Players = new List<Player>();
}