Files
Vampire-Survivor/Assets/Player/Scripts/PlayerManager.cs
T
2023-10-10 16:30:12 +02:00

23 lines
419 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerManager : MonoBehaviour
{
public float Health = 100f;
public float Speed = 10f;
public int Exp = 0;
public int Level = 1;
public void AddExperience(int value)
{
Exp += value;
if (Exp >= Level * 10)
{
Exp -= Level * 10;
Level++;
}
}
}