rabidus-test/Assets/Scripts/PlayerSetup.cs

22 lines
461 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);
}
2023-07-28 11:48:57 +03:00
public void AddScore(float ammount)
2023-07-24 16:38:13 +03:00
{
_currentPlayer.Score = ammount;
}
}