first commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace OTG.Lab06.Combat
|
||||
{
|
||||
public sealed class FloatingDamageManager : MonoBehaviour
|
||||
{
|
||||
private static FloatingDamageManager instance;
|
||||
|
||||
[SerializeField] private FloatingDamage floatingDamagePrefab;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public static void Show(float amount, Vector3 position)
|
||||
{
|
||||
if (instance == null || instance.floatingDamagePrefab == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
FloatingDamage damage = Instantiate(instance.floatingDamagePrefab, position, Quaternion.identity);
|
||||
damage.Initialize(amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user