rabidus-test/Assets/PlayerSetup.cs

22 lines
459 B
C#
Raw Normal View History

2023-07-24 16:38:13 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerSetup : MonoBehaviour
{
[SerializeField]
private PlayerInfo _playerInfo;
private Player _currentPlayer;
public void CreateNewPlayer(string name)
{
_currentPlayer = new Player(name);
_playerInfo.Players.Add(_currentPlayer);
}
public void AddScore(int ammount)
{
_currentPlayer.Score = ammount;
}
}