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
+36
View File
@@ -0,0 +1,36 @@
using UnityEngine;
public enum OrbValues
{
One = 1,
Ten = 10,
Hundred = 100
};
[RequireComponent(typeof(SpriteRenderer))]
public class OrbStats : MonoBehaviour
{
public OrbValues OrbValue = OrbValues.One;
private SpriteRenderer _sr;
private void Start()
{
_sr = GetComponent<SpriteRenderer>();
}
private void Update()
{
switch (OrbValue)
{
case OrbValues.One:
_sr.color = new Color(0.25f, 1f, 0.25f);
break;
case OrbValues.Ten:
_sr.color = new Color(0.23f, 0.73f, 1f);
break;
case OrbValues.Hundred:
_sr.color = new Color(1f, 0.23f, 0.71f);
break;
}
}
}