Orb of experience(s)

This commit is contained in:
2023-10-10 16:30:12 +02:00
parent 2abdb96912
commit ae38582ddc
15 changed files with 511 additions and 6 deletions
+22
View File
@@ -0,0 +1,22 @@
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++;
}
}
}