first commit
This commit is contained in:
18
Assets/Materials/JusticeScale/Scripts/Scales/Scale.cs
Normal file
18
Assets/Materials/JusticeScale/Scripts/Scales/Scale.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace JusticeScale.Scripts.Scales
|
||||
{
|
||||
public abstract class Scale : MonoBehaviour
|
||||
{
|
||||
public abstract float TotalWeight { get; }
|
||||
[SerializeField] protected LayerMask layerMask = -1; // LayerMask specifying which layers to include in the scale detection
|
||||
|
||||
[SerializeField] [Tooltip("The current weight of the scale (not visible in the Inspector), for easy developer testing.")]
|
||||
protected float weight; // Current weight for inspector display; TotalWeight is the actual calculated value.
|
||||
|
||||
private void Update()
|
||||
{
|
||||
weight = TotalWeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user